#file-encryption #compile-time #perfect-hash #hash-table #resources #bundling #generation

spx

File archive library for bundling and protecting resources using compile-time code generation

4 releases (breaking)

0.5.0 Jul 17, 2023
0.4.1 Jul 16, 2023
0.3.1 Jul 16, 2023
0.2.0 Jul 15, 2023
0.1.0 Jul 15, 2023

#1309 in Cryptography

Download history 17/week @ 2024-02-18 6/week @ 2024-02-25 1/week @ 2024-03-03 7/week @ 2024-03-10 1/week @ 2024-03-17 43/week @ 2024-03-31

51 downloads per month
Used in spx-codegen

Apache-2.0

15KB
374 lines

SPX

A file archive library for bundling and protecting resources using compile-time code generation.

A generated SPX archive file does not contains any metadata. Each files are encrypted with Chacha20 using sha256 hash of file path as key. Offset and size for each files are mapped with perfect hash table and stored inside compiled binary without original filename. But without correct file name, it is impossible to find correct offset size pair and original file data.

License

Apache-2.0

Dependencies

~1.6–2.4MB
~50K SLoC