worked sleep.h
doc sleep.3 needs rename
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
README.txt
10
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
|
||||
This is My Software
|
||||
|
||||
24
docs/dat.1
24
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 ;)
|
||||
|
||||
16
docs/sleep.3
Normal file
16
docs/sleep.3
Normal file
@@ -0,0 +1,16 @@
|
||||
.TH SLEEP 3 "September 2025" "Dat-Thang LTS" "Libary Functions Manual"
|
||||
.SH NAME
|
||||
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sleep.h>
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
.SH RETURN VALUES
|
||||
|
||||
.SH FILES
|
||||
|
||||
.SH AUTHORS
|
||||
|
||||
.SH NOTES
|
||||
41
inc/sleep.h
41
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 <stdint.h>
|
||||
#include <stddef.h>
|
||||
// test
|
||||
#include <assert.h>
|
||||
|
||||
#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 */
|
||||
|
||||
Reference in New Issue
Block a user