diff --git a/.dat/content.bitfield b/.dat/content.bitfield index e8a027a..660fda4 100644 Binary files a/.dat/content.bitfield and b/.dat/content.bitfield differ diff --git a/.dat/content.signatures b/.dat/content.signatures index 75ab232..240e30c 100644 Binary files a/.dat/content.signatures and b/.dat/content.signatures differ diff --git a/.dat/content.tree b/.dat/content.tree index 6911071..c5e8853 100644 Binary files a/.dat/content.tree and b/.dat/content.tree differ diff --git a/.dat/metadata.bitfield b/.dat/metadata.bitfield index 62d0e7c..2607b27 100644 Binary files a/.dat/metadata.bitfield and b/.dat/metadata.bitfield differ diff --git a/.dat/metadata.data b/.dat/metadata.data index 75dd912..0fb2e11 100644 Binary files a/.dat/metadata.data and b/.dat/metadata.data differ diff --git a/.dat/metadata.signatures b/.dat/metadata.signatures index 577814a..23c3094 100644 Binary files a/.dat/metadata.signatures and b/.dat/metadata.signatures differ diff --git a/.dat/metadata.tree b/.dat/metadata.tree index ae75f5d..83afd7a 100644 Binary files a/.dat/metadata.tree and b/.dat/metadata.tree differ diff --git a/README.txt b/README.txt index ad27d5d..2d1da51 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ breaking out of Node-JS jail and enabling both C and Scheme env dis dat://59d8099399510e23a3c693fb5887b7bba1586f4117f7ef1c5872622ada0c1181 - +Warning: this may publicly expose your IP and the old tools are unmaintained you might discuss here cabal://cf2caf3a1c4fd299471d315416b6cc3d9c5f7c678046652fb70ede4ff16698db @@ -20,10 +20,12 @@ i implement the SLEEP spec as a C header (similar to REST with HTML) then i provide FFI bindings so you can call easily from scheme i also have a novel solution for hyperswarm-dht (i think) -what this means and what this does is -this is a p2p program that does away with the client-server model, +what this means and what this does: +here be a p2p program that does away with the client-server model, and enables you to basically share any directory in your system as a torrent (basically esentially) +the 'thang' part is the client, eventually i'm targetting wasm + "why? when hyper:// is here now with so cool much better justwerks dApps(Decentralized Apps)???" I like the sound of dat:// better, this is cooler no offense, and the scope of this project is longevity and community archival. @@ -37,4 +39,4 @@ i'm using C because ez libraries, assert is the ultimate hack, and scheme becaus LICENSE see LICENSE -This is My Software \ No newline at end of file +This is My Software diff --git a/docs/dat.1 b/docs/dat.1 index 8b57b5c..76308da 100644 --- a/docs/dat.1 +++ b/docs/dat.1 @@ -7,12 +7,22 @@ .Nd call a dat method .Sh SYNOPSIS .Nm -.Op Fl d Ar debug -. -.Oo -.Op Fl t Ar type -.Ar method -.Op Ar argument ... +.Oo +.Op Fl c Ar create + .Oo + .Op Fl d Ar debug + .Oo + .Op Fl s Ar sync + .Oo + .Op Fl t Ar type + .Oo + .Op Fl v Ar version + .Ar method + .Op Ar argument ... + + + + .Oc .Sh DESCRIPTION [WIP] dis dat mf thang @@ -27,7 +37,7 @@ its there "Dat" was first written about by Mathias Buus Madsen & Maxwell Ogden (c) 2015 .Nm was written and directed by -.An churtzan Aq @4c3NtV5p+7MRCwinLcD+dVMgz2rGbX2wF/ZtDxBA/Lw=.ed25519 +.An 饾柤檀蜐蜐蛯蛵蜌蛵谈探虤蛻虧蛽虡饾梺痰蛣虜叹袒蛧虡谈叹蜆虛虧虨蛵饾棊谈蜆蛢蜖碳獭蜁檀蛠虛蛣蜏袒苔饾棆谈蛫蜐蛺蛶碳蛧痰蛦蜐蜄獭蜏饾棈谈蛦蛠蜐蜁虪碳谈蛣虙蜎虣蜌袒饾棑痰虝蜐虤虩挞虧檀虛蛝蛶虧酞饾柡谈蜐虙蜖蜌蛽虪谈虙蛠蛬蜁蜏蜁饾棁檀虗蛬蛣蜋虨蛧痰蛯蛼蜏虣蜁 Aq @4c3NtV5p+7MRCwinLcD+dVMgz2rGbX2wF/ZtDxBA/Lw=.ed25519 .Sh BUGS .Pp Go ahead an fix em ;) diff --git a/docs/sleep.3 b/docs/sleep.3 new file mode 100644 index 0000000..8289ca5 --- /dev/null +++ b/docs/sleep.3 @@ -0,0 +1,16 @@ +.TH SLEEP 3 "September 2025" "Dat-Thang LTS" "Libary Functions Manual" +.SH NAME + +.SH SYNOPSIS +.nf +.B #include + +.SH DESCRIPTION + +.SH RETURN VALUES + +.SH FILES + +.SH AUTHORS + +.SH NOTES diff --git a/inc/sleep.h b/inc/sleep.h index 2eb10eb..9d0d7de 100644 --- a/inc/sleep.h +++ b/inc/sleep.h @@ -1,9 +1,6 @@ -// TODO implement SLEEP #ifndef SLEEP_H #define SLEEP_H - -#include "key.h" - +// TODO implement SLEEP /*metadata.key metadata.signatures metadata.bitfield @@ -13,5 +10,39 @@ content.key content.signatures content.bitfield content.tree*/ +#include "key.h" +#include +#include +// test +#include -#endif /* NURSERY_H */ +#define SLEEP_HEADER_SIZE 32u + +#define SLEEP_ALGO_BLAKE2B "BLAKE2b" +#define SLEEP_ALGO_ED25519 "Ed25519" + +typedef struct sleep_header { + uint32_t magic_be; + uint8_t version; + uint16_t entry_size_be; + uint8_t algo_len; + char algo[24]; +} sleep_header_t; + +// crypto helpers +#ifdef SLEEP_SALT +int sleep_gen_ed25519(uint8_t pubkey[32], uint8_t seckey[64]); +// sign +int sleep_sign_ed25519(const uint8_t *msg, size_t msglen, + const uint8_t seckey[64], uint8_t sig_out[64]); +// verify +int sleep_verify_ed25519(const uint8_t *msg, size_t msglen, + const uint8_t pubkey[32], const uint8_t sig[64]); +// discovery +int sleep_compute_discovery_key(const uint8_t pubkey[32], uint8_t out32[32]); +#endif /* SLEEP_SALT */ + +// function decs + + +#endif /* SLEEP_H */