Download seb/runtime/c_src/seb_lattice.h from Snapkitty/sov-kernel-monster: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/seb/runtime/c_src/seb_lattice.h
- Command line
-
hf download hf://Snapkitty/sov-kernel-monster/seb/runtime/c_src/seb_lattice.h
-
curl -L -o seb_lattice.h https://huggingface.co/Snapkitty/sov-kernel-monster/resolve/main/seb/runtime/c_src/seb_lattice.h
1.34 kB
| // seb_lattice.h | |
| // SEB Lattice Circuit — single header, C99, zero dependencies | |
| // | |
| // Circuit: R = GF(2^8)[x]/(x^32 + 1), AES irreducible 0x11B | |
| // Commitment = K0*prev XOR K1*payload[0:32] XOR K2*payload[32:64] | |
| // K0=1 (invertible) => tip injectivity trivially holds | |
| // 96 bytes in -> 32 bytes out, no branches on secret data | |
| typedef long long seb_off_t; | |
| typedef off_t seb_off_t; | |
| extern "C" { | |
| /* Circuit: commitment = K0*prev XOR K1*payload[0:32] XOR K2*payload[32:64] */ | |
| void seb_lattice_commit(const uint8_t prev[32], | |
| const uint8_t payload[64], | |
| uint8_t next[32]); | |
| /* Append: read tip, commit, write 96-byte record, fsync */ | |
| int seb_lattice_append(int fd, const uint8_t payload[64], uint8_t record[96]); | |
| /* Tip: last 32 bytes of file (genesis zeros if empty) */ | |
| int seb_lattice_tip(int fd, uint8_t tip[32]); | |
| /* Verify: re-evaluate chain from start_offset, count records */ | |
| int seb_lattice_verify(int fd, seb_off_t start_offset, size_t count); | |
| } | |