commit 27c59be7cbbae4289f6bd16dcb8c7b3ac004e0a5
parent 0f0b78f11d5697c0b6bb546b40cdd90c43b0e927
Author: finwo <finwo@pm.me>
Date: Sat, 14 Mar 2026 19:21:35 +0100
Moved orlp/ed25519 to new structure
Diffstat:
4 files changed, 1 insertion(+), 178 deletions(-)
diff --git a/MANIFEST b/MANIFEST
@@ -1 +1,2 @@
finwo/resp.c https://github.com/finwo/resp.c/archive/refs/heads/main.tar.gz
+orlp/ed25519 https://git.finwo.net/misc/dep-repository/archives/heads/pkg/orlp/ed25519.tar.gz
diff --git a/orlp/ed25519/config.mk b/orlp/ed25519/config.mk
@@ -1,10 +0,0 @@
-# SRC+=__DIRNAME/src/add_scalar.c
-SRC+=__DIRNAME/src/fe.c
-SRC+=__DIRNAME/src/ge.c
-SRC+=__DIRNAME/src/key_exchange.c
-SRC+=__DIRNAME/src/keypair.c
-SRC+=__DIRNAME/src/sc.c
-SRC+=__DIRNAME/src/seed.c
-SRC+=__DIRNAME/src/sha512.c
-SRC+=__DIRNAME/src/sign.c
-SRC+=__DIRNAME/src/verify.c
diff --git a/orlp/ed25519/package.ini b/orlp/ed25519/package.ini
@@ -1,12 +0,0 @@
-[repository]
-github=orlp/ed25519
-
-[package]
-name=orlp/ed25519
-
-[export]
-config.mk=config.mk
-include/orlp/ed25519.h=src/ed25519.h
-
-[build]
-0000=patch -p1 < patch/00-single-file-compile.patch
diff --git a/orlp/ed25519/patch/00-single-file-compile.patch b/orlp/ed25519/patch/00-single-file-compile.patch
@@ -1,156 +0,0 @@
-diff --git a/src/sc.c b/src/sc.c
-index ca5bad2..3d2ab56 100644
---- a/src/sc.c
-+++ b/src/sc.c
-@@ -1,7 +1,7 @@
- #include "fixedint.h"
- #include "sc.h"
-
--static uint64_t load_3(const unsigned char *in) {
-+static uint64_t sc_load_3(const unsigned char *in) {
- uint64_t result;
-
- result = (uint64_t) in[0];
-@@ -11,7 +11,7 @@ static uint64_t load_3(const unsigned char *in) {
- return result;
- }
-
--static uint64_t load_4(const unsigned char *in) {
-+static uint64_t sc_load_4(const unsigned char *in) {
- uint64_t result;
-
- result = (uint64_t) in[0];
-@@ -33,30 +33,30 @@ Output:
- */
-
- void sc_reduce(unsigned char *s) {
-- int64_t s0 = 2097151 & load_3(s);
-- int64_t s1 = 2097151 & (load_4(s + 2) >> 5);
-- int64_t s2 = 2097151 & (load_3(s + 5) >> 2);
-- int64_t s3 = 2097151 & (load_4(s + 7) >> 7);
-- int64_t s4 = 2097151 & (load_4(s + 10) >> 4);
-- int64_t s5 = 2097151 & (load_3(s + 13) >> 1);
-- int64_t s6 = 2097151 & (load_4(s + 15) >> 6);
-- int64_t s7 = 2097151 & (load_3(s + 18) >> 3);
-- int64_t s8 = 2097151 & load_3(s + 21);
-- int64_t s9 = 2097151 & (load_4(s + 23) >> 5);
-- int64_t s10 = 2097151 & (load_3(s + 26) >> 2);
-- int64_t s11 = 2097151 & (load_4(s + 28) >> 7);
-- int64_t s12 = 2097151 & (load_4(s + 31) >> 4);
-- int64_t s13 = 2097151 & (load_3(s + 34) >> 1);
-- int64_t s14 = 2097151 & (load_4(s + 36) >> 6);
-- int64_t s15 = 2097151 & (load_3(s + 39) >> 3);
-- int64_t s16 = 2097151 & load_3(s + 42);
-- int64_t s17 = 2097151 & (load_4(s + 44) >> 5);
-- int64_t s18 = 2097151 & (load_3(s + 47) >> 2);
-- int64_t s19 = 2097151 & (load_4(s + 49) >> 7);
-- int64_t s20 = 2097151 & (load_4(s + 52) >> 4);
-- int64_t s21 = 2097151 & (load_3(s + 55) >> 1);
-- int64_t s22 = 2097151 & (load_4(s + 57) >> 6);
-- int64_t s23 = (load_4(s + 60) >> 3);
-+ int64_t s0 = 2097151 & sc_load_3(s);
-+ int64_t s1 = 2097151 & (sc_load_4(s + 2) >> 5);
-+ int64_t s2 = 2097151 & (sc_load_3(s + 5) >> 2);
-+ int64_t s3 = 2097151 & (sc_load_4(s + 7) >> 7);
-+ int64_t s4 = 2097151 & (sc_load_4(s + 10) >> 4);
-+ int64_t s5 = 2097151 & (sc_load_3(s + 13) >> 1);
-+ int64_t s6 = 2097151 & (sc_load_4(s + 15) >> 6);
-+ int64_t s7 = 2097151 & (sc_load_3(s + 18) >> 3);
-+ int64_t s8 = 2097151 & sc_load_3(s + 21);
-+ int64_t s9 = 2097151 & (sc_load_4(s + 23) >> 5);
-+ int64_t s10 = 2097151 & (sc_load_3(s + 26) >> 2);
-+ int64_t s11 = 2097151 & (sc_load_4(s + 28) >> 7);
-+ int64_t s12 = 2097151 & (sc_load_4(s + 31) >> 4);
-+ int64_t s13 = 2097151 & (sc_load_3(s + 34) >> 1);
-+ int64_t s14 = 2097151 & (sc_load_4(s + 36) >> 6);
-+ int64_t s15 = 2097151 & (sc_load_3(s + 39) >> 3);
-+ int64_t s16 = 2097151 & sc_load_3(s + 42);
-+ int64_t s17 = 2097151 & (sc_load_4(s + 44) >> 5);
-+ int64_t s18 = 2097151 & (sc_load_3(s + 47) >> 2);
-+ int64_t s19 = 2097151 & (sc_load_4(s + 49) >> 7);
-+ int64_t s20 = 2097151 & (sc_load_4(s + 52) >> 4);
-+ int64_t s21 = 2097151 & (sc_load_3(s + 55) >> 1);
-+ int64_t s22 = 2097151 & (sc_load_4(s + 57) >> 6);
-+ int64_t s23 = (sc_load_4(s + 60) >> 3);
- int64_t carry0;
- int64_t carry1;
- int64_t carry2;
-@@ -360,42 +360,42 @@ Output:
- */
-
- void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c) {
-- int64_t a0 = 2097151 & load_3(a);
-- int64_t a1 = 2097151 & (load_4(a + 2) >> 5);
-- int64_t a2 = 2097151 & (load_3(a + 5) >> 2);
-- int64_t a3 = 2097151 & (load_4(a + 7) >> 7);
-- int64_t a4 = 2097151 & (load_4(a + 10) >> 4);
-- int64_t a5 = 2097151 & (load_3(a + 13) >> 1);
-- int64_t a6 = 2097151 & (load_4(a + 15) >> 6);
-- int64_t a7 = 2097151 & (load_3(a + 18) >> 3);
-- int64_t a8 = 2097151 & load_3(a + 21);
-- int64_t a9 = 2097151 & (load_4(a + 23) >> 5);
-- int64_t a10 = 2097151 & (load_3(a + 26) >> 2);
-- int64_t a11 = (load_4(a + 28) >> 7);
-- int64_t b0 = 2097151 & load_3(b);
-- int64_t b1 = 2097151 & (load_4(b + 2) >> 5);
-- int64_t b2 = 2097151 & (load_3(b + 5) >> 2);
-- int64_t b3 = 2097151 & (load_4(b + 7) >> 7);
-- int64_t b4 = 2097151 & (load_4(b + 10) >> 4);
-- int64_t b5 = 2097151 & (load_3(b + 13) >> 1);
-- int64_t b6 = 2097151 & (load_4(b + 15) >> 6);
-- int64_t b7 = 2097151 & (load_3(b + 18) >> 3);
-- int64_t b8 = 2097151 & load_3(b + 21);
-- int64_t b9 = 2097151 & (load_4(b + 23) >> 5);
-- int64_t b10 = 2097151 & (load_3(b + 26) >> 2);
-- int64_t b11 = (load_4(b + 28) >> 7);
-- int64_t c0 = 2097151 & load_3(c);
-- int64_t c1 = 2097151 & (load_4(c + 2) >> 5);
-- int64_t c2 = 2097151 & (load_3(c + 5) >> 2);
-- int64_t c3 = 2097151 & (load_4(c + 7) >> 7);
-- int64_t c4 = 2097151 & (load_4(c + 10) >> 4);
-- int64_t c5 = 2097151 & (load_3(c + 13) >> 1);
-- int64_t c6 = 2097151 & (load_4(c + 15) >> 6);
-- int64_t c7 = 2097151 & (load_3(c + 18) >> 3);
-- int64_t c8 = 2097151 & load_3(c + 21);
-- int64_t c9 = 2097151 & (load_4(c + 23) >> 5);
-- int64_t c10 = 2097151 & (load_3(c + 26) >> 2);
-- int64_t c11 = (load_4(c + 28) >> 7);
-+ int64_t a0 = 2097151 & sc_load_3(a);
-+ int64_t a1 = 2097151 & (sc_load_4(a + 2) >> 5);
-+ int64_t a2 = 2097151 & (sc_load_3(a + 5) >> 2);
-+ int64_t a3 = 2097151 & (sc_load_4(a + 7) >> 7);
-+ int64_t a4 = 2097151 & (sc_load_4(a + 10) >> 4);
-+ int64_t a5 = 2097151 & (sc_load_3(a + 13) >> 1);
-+ int64_t a6 = 2097151 & (sc_load_4(a + 15) >> 6);
-+ int64_t a7 = 2097151 & (sc_load_3(a + 18) >> 3);
-+ int64_t a8 = 2097151 & sc_load_3(a + 21);
-+ int64_t a9 = 2097151 & (sc_load_4(a + 23) >> 5);
-+ int64_t a10 = 2097151 & (sc_load_3(a + 26) >> 2);
-+ int64_t a11 = (sc_load_4(a + 28) >> 7);
-+ int64_t b0 = 2097151 & sc_load_3(b);
-+ int64_t b1 = 2097151 & (sc_load_4(b + 2) >> 5);
-+ int64_t b2 = 2097151 & (sc_load_3(b + 5) >> 2);
-+ int64_t b3 = 2097151 & (sc_load_4(b + 7) >> 7);
-+ int64_t b4 = 2097151 & (sc_load_4(b + 10) >> 4);
-+ int64_t b5 = 2097151 & (sc_load_3(b + 13) >> 1);
-+ int64_t b6 = 2097151 & (sc_load_4(b + 15) >> 6);
-+ int64_t b7 = 2097151 & (sc_load_3(b + 18) >> 3);
-+ int64_t b8 = 2097151 & sc_load_3(b + 21);
-+ int64_t b9 = 2097151 & (sc_load_4(b + 23) >> 5);
-+ int64_t b10 = 2097151 & (sc_load_3(b + 26) >> 2);
-+ int64_t b11 = (sc_load_4(b + 28) >> 7);
-+ int64_t c0 = 2097151 & sc_load_3(c);
-+ int64_t c1 = 2097151 & (sc_load_4(c + 2) >> 5);
-+ int64_t c2 = 2097151 & (sc_load_3(c + 5) >> 2);
-+ int64_t c3 = 2097151 & (sc_load_4(c + 7) >> 7);
-+ int64_t c4 = 2097151 & (sc_load_4(c + 10) >> 4);
-+ int64_t c5 = 2097151 & (sc_load_3(c + 13) >> 1);
-+ int64_t c6 = 2097151 & (sc_load_4(c + 15) >> 6);
-+ int64_t c7 = 2097151 & (sc_load_3(c + 18) >> 3);
-+ int64_t c8 = 2097151 & sc_load_3(c + 21);
-+ int64_t c9 = 2097151 & (sc_load_4(c + 23) >> 5);
-+ int64_t c10 = 2097151 & (sc_load_3(c + 26) >> 2);
-+ int64_t c11 = (sc_load_4(c + 28) >> 7);
- int64_t s0;
- int64_t s1;
- int64_t s2;