on master help sign in
got things compiing
commit27a2616a457b19a1bd622045651498d662c652ed authoriko <mail@iko.soy> dateSun 11 Aug 2024, 01:31 (2 years ago) parent5fcb32c
6 files changed+694−121
flake.lock+17−34 flake.nix+18−87 sha256.c+87 softfloat.nix+14 softfloat/patch.diff+13 vere.patch+545
flake.lock+17−34
@@ -18,22 +18,6 @@
1818 "type": "github"
1919 }
2020 },
21− "libaes_siv": {
22− "flake": false,
23− "locked": {
24− "lastModified": 1602781365,
25− "narHash": "sha256-8X9Nd2H1wM5wIoG3nPp0Kc5f4LyX0mjNPx1fXirwnLw=",
26− "owner": "dfoxfranke",
27− "repo": "libaes_siv",
28− "rev": "9681279cfaa6e6399bb7ca3afbbc27fc2e19df4b",
29− "type": "github"
30− },
31− "original": {
32− "owner": "dfoxfranke",
33− "repo": "libaes_siv",
34− "type": "github"
35− }
36− },
3721 "murmur3": {
3822 "flake": false,
3923 "locked": {
@@ -84,15 +68,30 @@
8468 "root": {
8569 "inputs": {
8670 "flake-utils": "flake-utils",
87− "libaes_siv": "libaes_siv",
8871 "murmur3": "murmur3",
8972 "nixpkgs": "nixpkgs",
9073 "pdjson": "pdjson",
74+ "sha256": "sha256",
9175 "softfloat": "softfloat",
92− "urcrypt": "urcrypt",
9376 "vere": "vere"
9477 }
9578 },
79+ "sha256": {
80+ "flake": false,
81+ "locked": {
82+ "lastModified": 1670543087,
83+ "narHash": "sha256-TI6a7Zj3nuLlVbMyG2y+vJIY1RUUktm7tj1qrgxClOs=",
84+ "owner": "LekKit",
85+ "repo": "sha256",
86+ "rev": "c6cf8e509a713ef28c0b1b2f12578735b6402323",
87+ "type": "github"
88+ },
89+ "original": {
90+ "owner": "LekKit",
91+ "repo": "sha256",
92+ "type": "github"
93+ }
94+ },
9695 "softfloat": {
9796 "flake": false,
9897 "locked": {
@@ -124,22 +123,6 @@
124123 "type": "github"
125124 }
126125 },
127− "urcrypt": {
128− "flake": false,
129− "locked": {
130− "lastModified": 1722883901,
131− "narHash": "sha256-6T9HmqWKKxV9ivBY5jKun56s7WYmulk7y3M3heCYc3Y=",
132− "owner": "urbit",
133− "repo": "urcrypt",
134− "rev": "e77a0998809f7552c455cf7bf8c1b68c141cce18",
135− "type": "github"
136− },
137− "original": {
138− "owner": "urbit",
139− "repo": "urcrypt",
140− "type": "github"
141− }
142− },
143126 "vere": {
144127 "flake": false,
145128 "locked": {
flake.nix+18−87
@@ -6,18 +6,10 @@
66 url = "github:urbit/vere?ref=master";
77 flake = false;
88 };
9− urcrypt = {
10− url = "github:urbit/urcrypt";
11− flake = false;
12− };
139 murmur3 = {
1410 url = "github:PeterScott/murmur3";
1511 flake = false;
1612 };
17− libaes_siv = {
18− url = "github:dfoxfranke/libaes_siv";
19− flake = false;
20− };
2113 pdjson = {
2214 url = "github:skeeto/pdjson";
2315 flake = false;
@@ -26,9 +18,13 @@
2618 url = "github:ucb-bar/berkeley-softfloat-3";
2719 flake = false;
2820 };
21+ sha256 = {
22+ url = "github:LekKit/sha256";
23+ flake = false;
24+ };
2925 };
30− outputs = inputs@{ self, nixpkgs, flake-utils, vere, murmur3, pdjson
31− , softfloat, ... }:
26+ outputs =
27+ inputs@{ self, nixpkgs, flake-utils, vere, murmur3, pdjson, sha256, ... }:
3228 flake-utils.lib.eachDefaultSystem (system:
3329 let pkgs = nixpkgs.legacyPackages.${system};
3430 in {
@@ -44,101 +40,36 @@
4440 make
4541 make install
4642 '';
47− openssl = pkgs.openssl.overrideDerivation (old: {
48− configurePhase = ''
49− HOME=$TMPDIR
50− ${pkgs.emscripten}/bin/emconfigure ./Configure --no-asm --no-apps --prefix=$out ${
51− builtins.concatStringsSep " " old.configureFlags
52− }
53− '';
54− doCheck = false;
55− });
56− secp256k1 = pkgs.secp256k1.overrideDerivation (old: {
57− configurePhase = ''
58− ./autogen.sh
59− HOME=$TMPDIR
60− ${pkgs.emscripten}/bin/emconfigure ./configure --prefix=$out ${
61− builtins.concatStringsSep " " old.configureFlags
62− }
63− '';
64− doCheck = false;
65− });
66− libaes_siv = pkgs.runCommand "libaes_siv" {
67− buildInputs = with pkgs; [ emscripten ];
68− } ''
69− mkdir -p $out
70− HOME=$TMPDIR
71− emcc ${inputs.libaes_siv}/aes_siv.c -I${
72− ./libaes_siv/include
73− } -o $out/lib/libaes_siv.a
74− mkdir -p $out/include
75− cp ${inputs.libaes_siv}/aes_siv.h $out/include
76− '';
77− # libaes_siv = pkgs.stdenv.mkDerivation {
78− # name = "libaes_siv";
79− # src = inputs.libaes_siv;
80− # # configurePhase = ''
81− # # HOME=$TMPDIR
82− # # ${pkgs.emscripten}/bin/emconfigure ./configure --prefix=$out
83− # # '';
84− # buildInputs = with pkgs; [ cmake openssl ];
85− # };
86− urcrypt = pkgs.stdenv.mkDerivation {
87− name = "urcrypt";
88− src = inputs.urcrypt;
89− configurePhase = ''
90− runHook preConfigure
91−
92− ./autogen.sh
93− HOME=$TMPDIR
94− emconfigure ./configure --prefix=$out
95−
96− runHook preConfigure
97− '';
98− buildInputs = with pkgs; [
99− secp256k1
100− pkg-config
101− libaes_siv
102− openssl
103− ];
104− nativeBuildInputs = with pkgs; [
105− emscripten
106− autoconf
107− automake
108− autoconf-archive
109− libtool
110− ];
111− };
43+ softfloat =
44+ pkgs.callPackage ./softfloat.nix { inherit (inputs) softfloat; };
11245 nock = pkgs.runCommand "nock" { } ''
11346 cp -r ${vere}/pkg .
11447 chmod -R a+w pkg
11548 cp pkg/noun/platform/linux/rsignal.h pkg/noun/platform/rsignal.h
11649 patch -p1 <${./vere.patch}
117− rm pkg/noun/*_tests.c
50+ rm pkg/noun/*_tests.c pkg/noun/jets/e/aes* pkg/noun/jets/e/argon2.c \
51+ pkg/noun/jets/e/blake.c pkg/noun/jets/e/ed_* pkg/noun/jets/e/keccak.c \
52+ pkg/noun/jets/e/ripe.c pkg/noun/jets/e/scr.c pkg/noun/jets/e/secp.c \
53+ pkg/noun/jets/e/sha1.c pkg/noun/jets/e/shax.c
11854 mkdir -p $out
11955 HOME=$TMPDIR
12056 ${pkgs.emscripten}/bin/emcc \
121− pkg/noun/*.c pkg/noun/jets/*/*.c pkg/noun/jets/*.c pkg/c3/*.c pkg/ur/*.c ${urcrypt}/lib/liburcrypt.a \
122− ${murmur3}/murmur3.c ${pdjson}/pdjson.c ${gmp}/lib/libgmp.a ${urcrypt}/lib/liburcrypt.a \
57+ pkg/noun/*.c pkg/noun/jets/*/*.c pkg/noun/jets/*.c pkg/c3/*.c pkg/ur/*.c \
58+ ${murmur3}/murmur3.c ${pdjson}/pdjson.c ${gmp}/lib/libgmp.a ${sha256}/sha256.c \
59+ ${softfloat}/lib/softfloat.a \
12360 -o $out/nock.js \
12461 -DU3_OS_linux \
12562 -DU3_OS_ENDIAN_little \
12663 -DU3_GUARD_PAGE \
12764 -sEXPORTED_RUNTIME_METHODS=cwrap \
12865 -Ipkg -Ipkg/noun -Ipkg/c3 -Ipkg/ur -Ipkg/ent -I. \
129− -I${pdjson} -I${gmp}/include -I${murmur3} -I${urcrypt}/include -I${pkgs.libsigsegv}/include \
130− -I${pkgs.openssl.dev}/include -I${softfloat}/source/include \
66+ -I${pdjson} -I${gmp}/include -I${murmur3} -I${pkgs.libsigsegv}/include \
67+ -I${softfloat}/include -I${sha256} \
13168 -sEXPORTED_FUNCTIONS=_u3n_nock_on \
13269 # -Os
13370
13471 '';
135− hello = pkgs.hello;
136− default = hello;
137− };
138− apps = rec {
139− hello =
140− flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
141− default = hello;
14272 };
73+ apps = { };
14374 });
14475}
sha256.cnew file+87
@@ -0,0 +1,87 @@
1+#define NULL 0
2+#define SHA256_DIGEST_LENGTH 32
3+typedef __SIZE_TYPE__ size_t;
4+typedef unsigned char __uint8_t;
5+typedef __uint8_t uint8_t;
6+
7+void *evp_generic_fetch(OSSL_LIB_CTX *libctx, int operation_id,
8+ const char *name, const char *properties,
9+ void *(*new_method)(int name_id,
10+ const OSSL_ALGORITHM *algodef,
11+ OSSL_PROVIDER *prov),
12+ int (*up_ref_method)(void *),
13+ void (*free_method)(void *))
14+{
15+ struct evp_method_data_st methdata;
16+ void *method;
17+
18+ methdata.libctx = libctx;
19+ methdata.tmp_store = NULL;
20+ method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
21+ name, properties,
22+ new_method, up_ref_method, free_method);
23+ dealloc_tmp_evp_method_store(methdata.tmp_store);
24+ return method;
25+}
26+
27+int EVP_Digest(const void *data, size_t count,
28+ unsigned char *md, unsigned int *size, const void *type,
29+ void *impl)
30+{
31+ void *ctx = EVP_MD_CTX_new();
32+ int ret;
33+
34+ if (ctx == NULL)
35+ return 0;
36+ EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
37+ ret = EVP_DigestInit_ex(ctx, type, impl)
38+ && EVP_DigestUpdate(ctx, data, count)
39+ && EVP_DigestFinal_ex(ctx, md, size);
40+ EVP_MD_CTX_free(ctx);
41+
42+ return ret;
43+}
44+
45+void *EVP_MD_fetch(void *ctx, const char *algorithm,
46+ const char *properties)
47+{
48+ void *md =
49+ evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
50+ evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
51+
52+ return md;
53+}
54+
55+
56+int EVP_Q_digest(void *libctx, const char *name, const char *propq,
57+ const void *data, size_t datalen,
58+ unsigned char *md, size_t *mdlen)
59+{
60+ void *digest = EVP_MD_fetch(libctx, name, propq);
61+ unsigned int temp = 0;
62+ int ret = 0;
63+
64+ if (digest != NULL) {
65+ ret = EVP_Digest(data, datalen, md, &temp, digest, NULL);
66+ EVP_MD_free(digest);
67+ }
68+ if (mdlen != NULL)
69+ *mdlen = temp;
70+ return ret;
71+}
72+
73+unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md)
74+{
75+ static unsigned char m[SHA256_DIGEST_LENGTH];
76+
77+ if (md == NULL)
78+ md = m;
79+ return EVP_Q_digest(NULL, "SHA256", NULL, d, n, md, NULL) ? md : NULL;
80+}
81+
82+void
83+urcrypt_shay(const uint8_t *message, size_t length, uint8_t out[32])
84+{
85+ SHA256(message, length, out);
86+}
87+
softfloat.nixnew file+14
@@ -0,0 +1,14 @@
1+{ pkgs, softfloat, ... }:
2+pkgs.runCommand "nock" { buildInputs = [ pkgs.emscripten pkgs.binutils ]; } ''
3+ mkdir -p $out/lib
4+ mkdir -p $out/include
5+ cp -r ${softfloat} src
6+ chmod +w -R src
7+ cd src
8+ patch -p1 <${./softfloat/patch.diff}
9+ cd build/Linux-x86_64-GCC
10+ HOME=$TMPDIR
11+ make
12+ cp softfloat.a $out/lib
13+ cp ${softfloat}/source/include/* $out/include
14+''
softfloat/patch.diffnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/build/Linux-x86_64-GCC/Makefile b/build/Linux-x86_64-GCC/Makefile
2+index 72f251a..c3efaa2 100644
3+--- a/build/Linux-x86_64-GCC/Makefile
4++++ b/build/Linux-x86_64-GCC/Makefile
5+@@ -44,7 +44,7 @@ SOFTFLOAT_OPTS ?= \
6+ DELETE = rm -f
7+ C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
8+ COMPILE_C = \
9+- gcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \
10++ emcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \
11+ $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
12+ MAKELIB = ar crs $@
13+
vere.patch+545
@@ -10,3 +10,548 @@ index 002276834b..52ebb7817d 100644
1010
1111 # elif defined(U3_OS_osx)
1212 # include <ctype.h>
13+diff --git a/pkg/noun/jets.c b/pkg/noun/jets.c
14+index 45e7e8144a..0003896370 100644
15+--- a/pkg/noun/jets.c
16++++ b/pkg/noun/jets.c
17+@@ -14,7 +14,7 @@
18+ #include "retrieve.h"
19+ #include "serial.h"
20+ #include "trace.h"
21+-#include "urcrypt.h"
22++#include "sha256.h"
23+ #include "vortex.h"
24+ #include "xtract.h"
25+
26+@@ -128,7 +128,7 @@ _cj_bash(u3_noun bat)
27+ //
28+ c3_y* fat_y = sab_u.buf_y;
29+ c3_y dig_y[32];
30+- urcrypt_shay(fat_y, met_w, dig_y);
31++ sha256_easy_hash(fat_y, met_w, dig_y);
32+
33+ pro = u3i_bytes(32, dig_y);
34+ u3h_put(u3R->jed.bas_p, bat, u3k(pro));
35+diff --git a/pkg/noun/jets/tree.c b/pkg/noun/jets/tree.c
36+index 9e920becda..e6e17261f3 100644
37+--- a/pkg/noun/jets/tree.c
38++++ b/pkg/noun/jets/tree.c
39+@@ -53,7 +53,6 @@ static c3_c* _140_hex_mimes_ha[] = {
40+ 0
41+ };
42+
43+- static u3j_harm _140_hex_aes_ecba_en_a[] = {{".2", u3wea_ecba_en}, {}};
44+ static c3_c* _140_hex_aes_ecba_en_ha[] = {
45+ "d7674ad72666a787580c52785c5d4d37ca462ba05e904efbeded5d1bd8b02b4b",
46+ 0
47+@@ -64,16 +63,12 @@ static c3_c* _140_hex_mimes_ha[] = {
48+ 0
49+ };
50+ static u3j_core _140_hex_aes_ecba_d[] =
51+- { { "en", 7, _140_hex_aes_ecba_en_a, 0, _140_hex_aes_ecba_en_ha },
52+- { "de", 7, _140_hex_aes_ecba_de_a, 0, _140_hex_aes_ecba_de_ha },
53+- {}
54++ {
55+ };
56+ static c3_c* _140_hex_aes_ecba_ha[] = {
57+ "693409d27b777f73ce92cebd38e9ebceebe1e9c27ad8c9de9afc091e31bd7d9f",
58+ 0
59+ };
60+-
61+- static u3j_harm _140_hex_aes_ecbb_en_a[] = {{".2", u3wea_ecbb_en}, {}};
62+ static c3_c* _140_hex_aes_ecbb_en_ha[] = {
63+ "2c0e3c8f4d741b37324563ecd0ab8fbf87721d1e017f1eeeaf8b6a60515c483b",
64+ 0
65+@@ -84,149 +79,119 @@ static c3_c* _140_hex_mimes_ha[] = {
66+ 0
67+ };
68+ static u3j_core _140_hex_aes_ecbb_d[] =
69+- { { "en", 7, _140_hex_aes_ecbb_en_a, 0, _140_hex_aes_ecbb_en_ha },
70+- { "de", 7, _140_hex_aes_ecbb_de_a, 0, _140_hex_aes_ecbb_de_ha },
71+- {}
72++ {
73+ };
74+ static c3_c* _140_hex_aes_ecbb_ha[] = {
75+ "7255c39f10e068007d0d64dd40e4f6e83492ed2e3222919440be0d28fd42a5e3",
76+ 0
77+ };
78+
79+- static u3j_harm _140_hex_aes_ecbc_en_a[] = {{".2", u3wea_ecbc_en}, {}};
80+ static c3_c* _140_hex_aes_ecbc_en_ha[] = {
81+ "f56450f2662082e27ba1aecd2fe04c66aa8641d6eb155f8d3707e242a1e1cf1c",
82+ 0
83+ };
84+- static u3j_harm _140_hex_aes_ecbc_de_a[] = {{".2", u3wea_ecbc_de}, {}};
85+ static c3_c* _140_hex_aes_ecbc_de_ha[] = {
86+ "28c8c44002799fbe94d4aa07922f2b74dbbf234c84684cd8c3187622b4be6a5f",
87+ 0
88+ };
89+ static u3j_core _140_hex_aes_ecbc_d[] =
90+- { { "en", 7, _140_hex_aes_ecbc_en_a, 0, _140_hex_aes_ecbc_en_ha },
91+- { "de", 7, _140_hex_aes_ecbc_de_a, 0, _140_hex_aes_ecbc_de_ha },
92+- {}
93++ {
94+ };
95+ static c3_c* _140_hex_aes_ecbc_ha[] = {
96+ "65da73b8de06a6660ca2d36be881b708362e1f8bc12c01290aed90fdb2977667",
97+ 0
98+ };
99+
100+- static u3j_harm _140_hex_aes_cbca_en_a[] = {{".2", u3wea_cbca_en}, {}};
101+ static c3_c* _140_hex_aes_cbca_en_ha[] = {
102+ "f85366d520b3179c5dabfb58ee1fa0554f5044f676340439db875841cd4058de",
103+ 0
104+ };
105+- static u3j_harm _140_hex_aes_cbca_de_a[] = {{".2", u3wea_cbca_de}, {}};
106+ static c3_c* _140_hex_aes_cbca_de_ha[] = {
107+ "8b876fbdb1849d8fbabba5e143aea0532a0e5dfff1c784d7ad15fd497ea376b1",
108+ 0
109+ };
110+ static u3j_core _140_hex_aes_cbca_d[] =
111+- { { "en", 7, _140_hex_aes_cbca_en_a, 0, _140_hex_aes_cbca_en_ha },
112+- { "de", 7, _140_hex_aes_cbca_de_a, 0, _140_hex_aes_cbca_de_ha },
113+- {}
114++ {
115+ };
116+ static c3_c* _140_hex_aes_cbca_ha[] = {
117+ "420d04c03b7816b656fe4e8d9fce04f7e6d51d3d274c6511e89cfdb43ebf107e",
118+ 0
119+ };
120+
121+- static u3j_harm _140_hex_aes_cbcb_en_a[] = {{".2", u3wea_cbcb_en}, {}};
122+ static c3_c* _140_hex_aes_cbcb_en_ha[] = {
123+ "6f961e0629c5efce47793e6a352220d355bb8fba6656c6941a68efb3ba10999d",
124+ 0
125+ };
126+- static u3j_harm _140_hex_aes_cbcb_de_a[] = {{".2", u3wea_cbcb_de}, {}};
127+ static c3_c* _140_hex_aes_cbcb_de_ha[] = {
128+ "7ee2f33f80612e91fda1fd84201266dea6cab596a4e23a535d1a14fb0763f1a3",
129+ 0
130+ };
131+ static u3j_core _140_hex_aes_cbcb_d[] =
132+- { { "en", 7, _140_hex_aes_cbcb_en_a, 0, _140_hex_aes_cbcb_en_ha },
133+- { "de", 7, _140_hex_aes_cbcb_de_a, 0, _140_hex_aes_cbcb_de_ha },
134+- {}
135++ {
136+ };
137+ static c3_c* _140_hex_aes_cbcb_ha[] = {
138+ "1b84daab497795f2afd7238a6a6090be68b78eb6051b0ffa076b2ed9fedeebe5",
139+ 0
140+ };
141+
142+- static u3j_harm _140_hex_aes_cbcc_en_a[] = {{".2", u3wea_cbcc_en}, {}};
143+ static c3_c* _140_hex_aes_cbcc_en_ha[] = {
144+ "b2578cf17a3095f48cc96cf7690dd7ab4f4e0b76b2578eadc1dce31a075f5b12",
145+ 0
146+ };
147+- static u3j_harm _140_hex_aes_cbcc_de_a[] = {{".2", u3wea_cbcc_de}, {}};
148+ static c3_c* _140_hex_aes_cbcc_de_ha[] = {
149+ "36586f89d702bedb8c2a01ea3614f61627e762488e373106cbb1b27c46e3493c",
150+ 0
151+ };
152+ static u3j_core _140_hex_aes_cbcc_d[] =
153+- { { "en", 7, _140_hex_aes_cbcc_en_a, 0, _140_hex_aes_cbcc_en_ha },
154+- { "de", 7, _140_hex_aes_cbcc_de_a, 0, _140_hex_aes_cbcc_de_ha },
155+- {}
156++ {
157+ };
158+ static c3_c* _140_hex_aes_cbcc_ha[] = {
159+ "3bab1a59c7673afeb659821d54754e8e5e281243e79624fdbe4d7f85cae192c5",
160+ 0
161+ };
162+
163+- static u3j_harm _140_hex_aes_siva_en_a[] = {{".2", u3wea_siva_en}, {}};
164+ static c3_c* _140_hex_aes_siva_en_ha[] = {
165+ "2a137039301788b8540ed81cbfafe450c9306348d02a6576f5c14f6d6f20ba81",
166+ 0
167+ };
168+- static u3j_harm _140_hex_aes_siva_de_a[] = {{".2", u3wea_siva_de}, {}};
169+ static c3_c* _140_hex_aes_siva_de_ha[] = {
170+ "d0130e9229e71c589429dd87843dc104bc4ee5b426400a547081d8c91a548eaa",
171+ 0
172+ };
173+ static u3j_core _140_hex_aes_siva_d[] =
174+- { { "en", 7, _140_hex_aes_siva_en_a, 0, _140_hex_aes_siva_en_ha },
175+- { "de", 7, _140_hex_aes_siva_de_a, 0, _140_hex_aes_siva_de_ha },
176+- {}
177++ {
178+ };
179+ static c3_c* _140_hex_aes_siva_ha[] = {
180+ "435c5c769d2522d71ab60332bb57440d69c6803d5ca9a5faae88c825cb55d72e",
181+ 0
182+ };
183+
184+- static u3j_harm _140_hex_aes_sivb_en_a[] = {{".2", u3wea_sivb_en}, {}};
185+ static c3_c* _140_hex_aes_sivb_en_ha[] = {
186+ "1638f56e8728f285e4175c7b514c5a4e1a24205acf33e105f0513cad7ae843cf",
187+ 0
188+ };
189+- static u3j_harm _140_hex_aes_sivb_de_a[] = {{".2", u3wea_sivb_de}, {}};
190+ static c3_c* _140_hex_aes_sivb_de_ha[] = {
191+ "64c9b199fffd6d31baf7457bf27d5a510121be45201b2ae5cc1d9565c0bdd0ff",
192+ 0
193+ };
194+ static u3j_core _140_hex_aes_sivb_d[] =
195+- { { "en", 7, _140_hex_aes_sivb_en_a, 0, _140_hex_aes_sivb_en_ha },
196+- { "de", 7, _140_hex_aes_sivb_de_a, 0, _140_hex_aes_sivb_de_ha },
197+- {}
198++ {
199+ };
200+ static c3_c* _140_hex_aes_sivb_ha[] = {
201+ "0683f3f9067c2a16f68805c778c404179dc5df9019bbbe0f8d680a99a69e61fc",
202+ 0
203+ };
204+
205+- static u3j_harm _140_hex_aes_sivc_en_a[] = {{".2", u3wea_sivc_en}, {}};
206+ static c3_c* _140_hex_aes_sivc_en_ha[] = {
207+ "d721486dea943efd52d9e6450f4f48dd191c89637a2f842d3ff6edfd3beecbb9",
208+ 0
209+ };
210+- static u3j_harm _140_hex_aes_sivc_de_a[] = {{".2", u3wea_sivc_de}, {}};
211+ static c3_c* _140_hex_aes_sivc_de_ha[] = {
212+ "3ded831b992ea100582229a4d1d9b5c80380128ae6b59b5bb36403ed13dc5d55",
213+ 0
214+ };
215+ static u3j_core _140_hex_aes_sivc_d[] =
216+- { { "en", 7, _140_hex_aes_sivc_en_a, 0, _140_hex_aes_sivc_en_ha },
217+- { "de", 7, _140_hex_aes_sivc_de_a, 0, _140_hex_aes_sivc_de_ha },
218+- {}
219++ {
220+ };
221+ static c3_c* _140_hex_aes_sivc_ha[] = {
222+ "23ef582f110d28aff82b0795305b02e5a718d667bcae97091c08bc26790e7176",
223+@@ -270,75 +235,37 @@ static c3_c* _140_hex_lune_ha[] = {
224+ 0
225+ };
226+
227+-static u3j_harm _140_hex_coed__ed_puck_a[] = {{".2", u3wee_puck}, {}};
228+-static c3_c* _140_hex_coed__ed_puck_ha[] = {
229+- "1bc694675842345c50b0e20a2193bb5bcbb42f163fc832431a3d1822a81e4c98",
230+- 0
231+-};
232+-static u3j_harm _140_hex_coed__ed_sign_a[] = {{".2", u3wee_sign}, {}};
233+-static c3_c* _140_hex_coed__ed_sign_ha[] = {
234+- "34ad749bf8443611cbf1f7de90a066318bd12be36f2f7f6f55281f6f7ed79754",
235+- 0
236+-};
237+-static u3j_harm _140_hex_coed__ed_veri_a[] = {{".2", u3wee_veri}, {}};
238+ static c3_c* _140_hex_coed__ed_veri_ha[] = {
239+ "047a7eeccb2e68aeeee631b6db86e11a5a3aa9e179660553eca6304327612dcf",
240+ 0
241+ };
242+-static u3j_harm _140_hex_coed__ed_shar_a[] = {{".2", u3wee_shar}, {}};
243+ static c3_c* _140_hex_coed__ed_shar_ha[] = {
244+ "52d3b0a2f51f2b0a9dd72bb33db38c73dc873029c365d871d0559a1472a80e72",
245+ 0
246+ };
247+
248+- static u3j_harm _140_hex_coed__ed_point_add_a[] =
249+- {{".2", u3wee_point_add}, {}};
250+-
251+- static u3j_harm _140_hex_coed__ed_scalarmult_a[] =
252+- {{".2", u3wee_scalarmult}, {}};
253+ static c3_c* _140_hex_coed__ed_scalarmult_ha[] = {
254+ "72e71cd3aa3af429cd65baa78632500c60edd1d4c82a39d3ba7f231ef97e6316",
255+ 0
256+ };
257+
258+- static u3j_harm _140_hex_coed__ed_scalarmult_base_a[] =
259+- {{".2", u3wee_scalarmult_base}, {}};
260+ static c3_c* _140_hex_coed__ed_scalarmult_base_ha[] = {
261+ "976fdb8251f9b767af689a0d2c41b88941921bf53777c1ceeb5297511021f9d8",
262+ 0
263+ };
264+
265+- static u3j_harm _140_hex_coed__ed_add_scalarmult_scalarmult_base_a[] =
266+- {{".2", u3wee_add_scalarmult_scalarmult_base}, {}};
267+ static c3_c* _140_hex_coed__ed_add_scalarmult_scalarmult_base_ha[] = {
268+ "11819071c24a2d7b36daea6e16c78b2e05f9ca3e857cf4815ffe652ce677a61a",
269+ 0
270+ };
271+
272+- static u3j_harm _140_hex_coed__ed_add_double_scalarmult_a[] =
273+- {{".2", u3wee_add_double_scalarmult}, {}};
274+ static c3_c* _140_hex_coed__ed_add_double_scalarmult_ha[] = {
275+ "0fab78a1e890e53cecade1c22b95813db77e066044e33417a0919695b6cde9ba",
276+ 0
277+ };
278+
279+ static u3j_core _140_hex_coed__ed_d[] =
280+- { { "sign", 7, _140_hex_coed__ed_sign_a, 0, _140_hex_coed__ed_sign_ha },
281+- { "puck", 7, _140_hex_coed__ed_puck_a, 0, _140_hex_coed__ed_puck_ha },
282+- { "veri", 7, _140_hex_coed__ed_veri_a, 0, _140_hex_coed__ed_veri_ha },
283+- { "shar", 7, _140_hex_coed__ed_shar_a, 0, _140_hex_coed__ed_shar_ha },
284+- { "point-add", 7, _140_hex_coed__ed_point_add_a, 0, 0 },
285+- { "scalarmult", 7, _140_hex_coed__ed_scalarmult_a, 0,
286+- _140_hex_coed__ed_scalarmult_ha },
287+- { "scalarmult-base", 7, _140_hex_coed__ed_scalarmult_base_a, 0,
288+- _140_hex_coed__ed_scalarmult_base_ha },
289+- { "add-scalarmult-scalarmult-base", 7,
290+- _140_hex_coed__ed_add_scalarmult_scalarmult_base_a, 0,
291+- _140_hex_coed__ed_add_scalarmult_scalarmult_base_ha },
292+- { "add-double-scalarmult", 7,
293+- _140_hex_coed__ed_add_double_scalarmult_a, 0,
294+- _140_hex_coed__ed_add_double_scalarmult_ha },
295+- {}
296++ {
297+ };
298+ static c3_c* _140_hex_coed__ed_ha[] = {
299+ "7a44a962aa72933588b5c99a8b68ebac21ce3c4710c081cb66b3599b45af9ced",
300+@@ -368,66 +295,30 @@ static c3_c* _140_hex_hmac_ha[] = {
301+ 0
302+ };
303+
304+- static u3j_harm _140_hex_argon2_a[] = {{".2", u3we_argon2}, {}};
305+ static c3_c* _140_hex_argon2_ha[] = {
306+ "4df7cec141ffa2cc76b058846474ca42cc9840666ee3e7e80e565803e83ea98b",
307+ 0
308+ };
309+ static u3j_core _140_hex_argon_d[] =
310+- { { "argon2", 511, _140_hex_argon2_a, 0, _140_hex_argon2_ha },
311+- {}
312++ {
313+ };
314+ static c3_c* _140_hex_argon_ha[] = {
315+ "dc704c786192ecd09d4c206a8f28db3202b6e0eb03e3ce63a95987510ac312d6",
316+ 0
317+ };
318+
319+- static u3j_harm _140_hex_scr_pbk_a[] = {{".2", u3wes_pbk, c3y}, {}};
320+- static c3_c* _140_hex_scr_pbk_ha[] = { 0 };
321+- static u3j_harm _140_hex_scr_pbl_a[] = {{".2", u3wes_pbl, c3y}, {}};
322+- static c3_c* _140_hex_scr_pbl_ha[] = { 0 };
323+- static u3j_harm _140_hex_scr_hsh_a[] = {{".2", u3wes_hsh, c3y}, {}};
324+- static c3_c* _140_hex_scr_hsh_ha[] = { 0 };
325+- static u3j_harm _140_hex_scr_hsl_a[] = {{".2", u3wes_hsl, c3y}, {}};
326+- static c3_c* _140_hex_scr_hsl_ha[] = { 0 };
327+ static u3j_core _140_hex_scr_d[] =
328+- { { "pbk", 7, _140_hex_scr_pbk_a, 0, _140_hex_scr_pbk_ha },
329+- { "pbl", 7, _140_hex_scr_pbl_a, 0, _140_hex_scr_pbl_ha },
330+- { "hsh", 7, _140_hex_scr_hsh_a, 0, _140_hex_scr_hsh_ha },
331+- { "hsl", 7, _140_hex_scr_hsl_a, 0, _140_hex_scr_hsl_ha },
332+- {}
333++ {
334+ };
335+ static c3_c* _140_hex_scr_ha[] = { 0 };
336+
337+- static u3j_harm _140_hex_secp_secp256k1_make_a[] = {{".2", u3we_make, c3y}, {}};
338+- static c3_c* _140_hex_secp_secp256k1_make_ha[] = { 0 };
339+- static u3j_harm _140_hex_secp_secp256k1_sign_a[] = {{".2", u3we_sign, c3y}, {}};
340+- static c3_c* _140_hex_secp_secp256k1_sign_ha[] = { 0 };
341+- static u3j_harm _140_hex_secp_secp256k1_reco_a[] = {{".2", u3we_reco, c3y}, {}};
342+- static c3_c* _140_hex_secp_secp256k1_reco_ha[] = { 0 };
343+-
344+- static u3j_harm _140_hex_secp_secp256k1_schnorr_sosi_a[] =
345+- {{".2", u3we_sosi}, {}};
346+- static c3_c* _140_hex_secp_secp256k1_schnorr_sosi_ha[] = { 0 };
347+- static u3j_harm _140_hex_secp_secp256k1_schnorr_sove_a[] =
348+- {{".2", u3we_sove}, {}};
349+- static c3_c* _140_hex_secp_secp256k1_schnorr_sove_ha[] = { 0 };
350+ static u3j_core _140_hex_secp_secp256k1_schnorr_d[] =
351+- { { "sosi", 7,
352+- _140_hex_secp_secp256k1_schnorr_sosi_a, 0,
353+- _140_hex_secp_secp256k1_schnorr_sosi_ha },
354+- { "sove", 7,
355+- _140_hex_secp_secp256k1_schnorr_sove_a, 0,
356+- _140_hex_secp_secp256k1_schnorr_sove_ha },
357+- {}
358++ {
359+ };
360+ static c3_c* _140_hex_secp_secp256k1_schnorr_ha[] = { 0 };
361+
362+ static u3j_core _140_hex_secp_secp256k1_d[] =
363+- { { "make", 7, _140_hex_secp_secp256k1_make_a, 0, _140_hex_secp_secp256k1_make_ha },
364+- { "sign", 7, _140_hex_secp_secp256k1_sign_a, 0, _140_hex_secp_secp256k1_sign_ha },
365+- { "reco", 7, _140_hex_secp_secp256k1_reco_a, 0, _140_hex_secp_secp256k1_reco_ha },
366+- { "schnorr", 7, 0,
367++ { { "schnorr", 7, 0,
368+ _140_hex_secp_secp256k1_schnorr_d,
369+ _140_hex_secp_secp256k1_schnorr_ha },
370+ {}
371+@@ -445,44 +336,28 @@ static c3_c* _140_hex_secp_ha[] = {
372+ 0
373+ };
374+
375+- static u3j_harm _140_hex_blake2b_a[] = {{".2", u3we_blake, c3y}, {}};
376+ static c3_c* _140_hex_blake2b_ha[] = {
377+ "c432216ca53b5ad2284259167952761bb1046e280268c4d3b9ca70a2024e1934",
378+ 0
379+ };
380+ static u3j_core _140_hex_blake_d[] =
381+- { { "blake2b", 7, _140_hex_blake2b_a, 0, _140_hex_blake2b_ha },
382+- {}
383++ {
384+ };
385+ static c3_c* _140_hex_blake_ha[] = {
386+ "ff30d99ffb3e13d8aa50b2b8461c8edfabf0e76de22312d16d1d6daaf3636b5f",
387+ 0
388+ };
389+
390+- static u3j_harm _140_hex_kecc_k224_a[] =
391+- {{".2", u3we_kecc224, c3y, c3y, c3y}, {}};
392+- static u3j_harm _140_hex_kecc_k256_a[] =
393+- {{".2", u3we_kecc256, c3y, c3y, c3y}, {}};
394+- static u3j_harm _140_hex_kecc_k384_a[] =
395+- {{".2", u3we_kecc384, c3y, c3y, c3y}, {}};
396+- static u3j_harm _140_hex_kecc_k512_a[] =
397+- {{".2", u3we_kecc512, c3y, c3y, c3y}, {}};
398+ static u3j_core _140_hex_kecc_d[] =
399+- { { "k224", 7, _140_hex_kecc_k224_a, 0, no_hashes },
400+- { "k256", 7, _140_hex_kecc_k256_a, 0, no_hashes },
401+- { "k384", 7, _140_hex_kecc_k384_a, 0, no_hashes },
402+- { "k512", 7, _140_hex_kecc_k512_a, 0, no_hashes },
403+- {}
404++ {
405+ };
406+
407+- static u3j_harm _140_hex_ripemd_160_a[] = {{".2", u3we_ripe, c3y}, {}};
408+ static c3_c* _140_hex_ripemd_160_ha[] = {
409+ "176684b29926a01f5c60fa584e4691b0cbdc9b93608dcbe7d0cf3585683fa42f",
410+ 0
411+ };
412+ static u3j_core _140_hex_ripe_d[] =
413+- { { "ripemd160", 7, _140_hex_ripemd_160_a, 0, _140_hex_ripemd_160_ha },
414+- {}
415++ {
416+ };
417+ static c3_c* _140_hex_ripe_ha[] = {
418+ "b0cb16bf206c0496bb480e5759ea1afa7dee1748b64e5243c23fddb09720ebd0",
419+@@ -1369,55 +1244,30 @@ static c3_c* _140_tri__rh_ha[] = {
420+ 0
421+ };
422+
423+- static u3j_harm _140_tri__og_raw_a[] = {{".2", u3weo_raw}, {}};
424+ static c3_c* _140_tri__og_raw_ha[] = {
425+ "bbcbefc237dbebf6c141ba14fd9e0464a836127fd123d10da5f121e82d49ebdb",
426+ 0
427+ };
428+ static u3j_core _140_tri__og_d[] =
429+- { { "raw", 7, _140_tri__og_raw_a, 0, _140_tri__og_raw_ha },
430+- {}
431++ {
432+ };
433+ static c3_c* _140_tri__og_ha[] = {
434+ "74b9ae67eeabbffcff969ac7fdc7f4f0f4f67af64931e969bcac50d084e15fc0",
435+ 0
436+ };
437+
438+- static u3j_harm _140_tri__sha_sha1_a[] = {{".2", u3we_sha1}, {}};
439+ static c3_c* _140_tri__sha_sha1_ha[] = {
440+ "75aababa0688619d9df36238269119302a64ad2e3c69c53bd0057fe6b1abaf0c",
441+ 0
442+ };
443+ static u3j_core _140_tri__sha_d[] =
444+- { { "sha1", 7, _140_tri__sha_sha1_a, 0, _140_tri__sha_sha1_ha },
445+- {}
446++ {
447+ };
448+ static c3_c* _140_tri__sha_ha[] = {
449+ "3c22d2f8719cb626e8dfe1a4206bcbc14b678c1422c48322054b40f84416d557",
450+ 0
451+ };
452+
453+-static u3j_harm _140_tri_shax_a[] = {{".2", u3we_shax}, {}};
454+-static c3_c* _140_tri_shax_ha[] = {
455+- "0fc53de3ddc8b8f84a46136f1728fa3ed66a5113888d14907589d16bf5927ad8",
456+- 0
457+-};
458+-static u3j_harm _140_tri_shay_a[] = {{".2", u3we_shay}, {}};
459+-static c3_c* _140_tri_shay_ha[] = {
460+- "b6dbc72e15c2204f83f902619b7a60328f29c9d302ddb35c435111dea28c5470",
461+- 0
462+-};
463+-static u3j_harm _140_tri_shas_a[] = {{".2", u3we_shas}, {}};
464+-static c3_c* _140_tri_shas_ha[] = {
465+- "5230583767b7625b3496248ed03b6b94c1d4ee9b26342f9390bf999ec9b6cfdb",
466+- 0
467+-};
468+-static u3j_harm _140_tri_shal_a[] = {{".2", u3we_shal}, {}};
469+-static c3_c* _140_tri_shal_ha[] = {
470+- "3242912e29e3e1ed8d1a395cc860a82d78961b4278ed79bbdeb37cb5615bbf20",
471+- 0
472+-};
473+-
474+ static u3j_harm _140_ob_fein_a[] = {{".2", u3we_fein_ob}, {}};
475+ static c3_c* _140_ob_fein_ha[] = {
476+ 0
477+@@ -1452,10 +1302,6 @@ static u3j_core _140_tri_d[] =
478+ { "og", 7, 0, _140_tri__og_d, _140_tri__og_ha },
479+
480+ { "sha", 7, 0, _140_tri__sha_d, _140_tri__sha_ha },
481+- { "shax", 7, _140_tri_shax_a, 0, _140_tri_shax_ha },
482+- { "shay", 7, _140_tri_shay_a, 0, _140_tri_shay_ha },
483+- { "shas", 7, _140_tri_shas_a, 0, _140_tri_shas_ha },
484+- { "shal", 7, _140_tri_shal_a, 0, _140_tri_shal_ha },
485+
486+ { "ob", 3, 0, _140_ob_d, _140_ob_ha, _140_ob_ho },
487+ {}
488+@@ -2210,10 +2056,6 @@ static u3j_core _139_tri_d[] =
489+ { "og", 7, 0, _140_tri__og_d, no_hashes },
490+
491+ { "sha", 7, 0, _140_tri__sha_d, no_hashes },
492+- { "shax", 7, _140_tri_shax_a, 0, no_hashes },
493+- { "shay", 7, _140_tri_shay_a, 0, no_hashes },
494+- { "shas", 7, _140_tri_shas_a, 0, no_hashes },
495+- { "shal", 7, _140_tri_shal_a, 0, no_hashes },
496+
497+ { "ob", 3, 0, _140_ob_d, no_hashes, _140_ob_ho },
498+ {}
499+@@ -2390,10 +2232,6 @@ static u3j_core _138_tri_d[] =
500+ { "og", 7, 0, _140_tri__og_d, no_hashes },
501+
502+ { "sha", 7, 0, _140_tri__sha_d, no_hashes },
503+- { "shax", 7, _140_tri_shax_a, 0, no_hashes },
504+- { "shay", 7, _140_tri_shay_a, 0, no_hashes },
505+- { "shas", 7, _140_tri_shas_a, 0, no_hashes },
506+- { "shal", 7, _140_tri_shal_a, 0, no_hashes },
507+
508+ { "ob", 3, 0, _140_ob_d, no_hashes, _140_ob_ho },
509+ {}
510+diff --git a/pkg/noun/manage.c b/pkg/noun/manage.c
511+index d880a42032..55c6b9d6c2 100644
512+--- a/pkg/noun/manage.c
513++++ b/pkg/noun/manage.c
514+@@ -17,12 +17,10 @@
515+ #include "jets/k.h"
516+ #include "log.h"
517+ #include "nock.h"
518+-#include "openssl/crypto.h"
519+ #include "options.h"
520+ #include "platform/rsignal.h"
521+ #include "retrieve.h"
522+ #include "trace.h"
523+-#include "urcrypt.h"
524+ #include "vortex.h"
525+ #include "xtract.h"
526+
527+@@ -1992,22 +1990,6 @@ _cm_free_ssl(void* tox_v
528+
529+ extern void u3je_secp_init(void);
530+
531+-/* _cm_crypto(): initialize openssl and crypto jets.
532+-*/
533+-static void
534+-_cm_crypto()
535+-{
536+- /* Initialize OpenSSL with loom allocation functions. */
537+- if ( 0 == CRYPTO_set_mem_functions(&_cm_malloc_ssl,
538+- &_cm_realloc_ssl,
539+- &_cm_free_ssl) ) {
540+- u3l_log("%s", "openssl initialization failed");
541+- abort();
542+- }
543+-
544+- u3je_secp_init();
545+-}
546+-
547+ /* _cm_realloc2(): gmp-shaped realloc.
548+ */
549+ static void*
550+@@ -2031,7 +2013,6 @@ u3m_init(size_t len_i)
551+ {
552+ _cm_limits();
553+ _cm_signals();
554+- _cm_crypto();
555+
556+ // make sure GMP uses our malloc.
557+ //