cred-helper done

This commit is contained in:
Mars Ultor
2025-04-19 22:09:24 -05:00
parent 856c4ddb36
commit 0fc3887ad0
2144 changed files with 25460 additions and 3 deletions
Generated
+737
View File
@@ -2,20 +2,757 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 4 version = 4
[[package]]
name = "aead"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
"crypto-common",
"generic-array",
]
[[package]]
name = "aes"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
dependencies = [
"cfg-if",
"cipher",
"cpufeatures",
]
[[package]]
name = "aes-gcm"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
dependencies = [
"aead",
"aes",
"cipher",
"ctr",
"ghash",
"subtle",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "base64ct"
version = "1.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
[[package]]
name = "bitflags"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cipher"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"inout",
]
[[package]] [[package]]
name = "client" name = "client"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"aes-gcm",
"common", "common",
"ed25519-dalek",
"hkdf",
"rand 0.9.1",
"rsa",
"sha2",
"x25519-dalek",
"zeroize",
] ]
[[package]] [[package]]
name = "common" name = "common"
version = "0.1.0" version = "0.1.0"
dependencies = [
"aes-gcm",
"ed25519-dalek",
"hkdf",
"rand 0.9.1",
"rsa",
"sha2",
"x25519-dalek",
"zeroize",
]
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "cpufeatures"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
[[package]]
name = "cred-helper"
version = "0.1.0"
dependencies = [
"aes-gcm",
"ed25519-dalek",
"hkdf",
"rand 0.9.1",
"rsa",
"sha2",
"x25519-dalek",
"zeroize",
]
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"rand_core 0.6.4",
"typenum",
]
[[package]]
name = "ctr"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
"cipher",
]
[[package]]
name = "curve25519-dalek"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"digest",
"fiat-crypto",
"rustc_version",
"subtle",
"zeroize",
]
[[package]]
name = "curve25519-dalek-derive"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "der"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
dependencies = [
"const-oid",
"pem-rfc7468",
"zeroize",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"const-oid",
"crypto-common",
"subtle",
]
[[package]]
name = "ed25519"
version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
dependencies = [
"pkcs8",
"serde",
"signature",
]
[[package]]
name = "ed25519-dalek"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
dependencies = [
"curve25519-dalek",
"ed25519",
"rand_core 0.6.4",
"serde",
"sha2",
"subtle",
"zeroize",
]
[[package]]
name = "fiat-crypto"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "getrandom"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
]
[[package]]
name = "getrandom"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasi 0.14.2+wasi-0.2.4",
]
[[package]]
name = "ghash"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
dependencies = [
"opaque-debug",
"polyval",
]
[[package]]
name = "hkdf"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
dependencies = [
"hmac",
]
[[package]]
name = "hmac"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
"digest",
]
[[package]]
name = "inout"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
dependencies = [
"generic-array",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
dependencies = [
"spin",
]
[[package]]
name = "libc"
version = "0.2.172"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
[[package]]
name = "libm"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
[[package]]
name = "num-bigint-dig"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
dependencies = [
"byteorder",
"lazy_static",
"libm",
"num-integer",
"num-iter",
"num-traits",
"rand 0.8.5",
"smallvec",
"zeroize",
]
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-iter"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
"libm",
]
[[package]]
name = "opaque-debug"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "pem-rfc7468"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
dependencies = [
"base64ct",
]
[[package]]
name = "pkcs1"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
dependencies = [
"der",
"pkcs8",
"spki",
]
[[package]]
name = "pkcs8"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
dependencies = [
"der",
"spki",
]
[[package]]
name = "polyval"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
dependencies = [
"cfg-if",
"cpufeatures",
"opaque-debug",
"universal-hash",
]
[[package]]
name = "ppv-lite86"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
"zerocopy",
]
[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"rand_chacha 0.3.1",
"rand_core 0.6.4",
]
[[package]]
name = "rand"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.3",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core 0.6.4",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.9.3",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom 0.2.15",
]
[[package]]
name = "rand_core"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
"getrandom 0.3.2",
]
[[package]]
name = "rsa"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"
dependencies = [
"const-oid",
"digest",
"num-bigint-dig",
"num-integer",
"num-traits",
"pkcs1",
"pkcs8",
"rand_core 0.6.4",
"signature",
"spki",
"subtle",
"zeroize",
]
[[package]]
name = "rustc_version"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
[[package]]
name = "semver"
version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
[[package]]
name = "serde"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "server" name = "server"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"aes-gcm",
"common", "common",
"ed25519-dalek",
"hkdf",
"rand 0.9.1",
"rsa",
"sha2",
"x25519-dalek",
"zeroize",
]
[[package]]
name = "sha2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "signature"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest",
"rand_core 0.6.4",
]
[[package]]
name = "smallvec"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "spki"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
dependencies = [
"base64ct",
"der",
]
[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "typenum"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "universal-hash"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
"crypto-common",
"subtle",
]
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi"
version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
"wit-bindgen-rt",
]
[[package]]
name = "wit-bindgen-rt"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
dependencies = [
"bitflags",
]
[[package]]
name = "x25519-dalek"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277"
dependencies = [
"curve25519-dalek",
"rand_core 0.6.4",
"serde",
"zeroize",
]
[[package]]
name = "zerocopy"
version = "0.8.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "zeroize"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn",
] ]
+2 -1
View File
@@ -2,6 +2,7 @@
members = [ members = [
"client", "client",
"server", "server",
"common" "common",
"cred-helper"
] ]
+8
View File
@@ -6,3 +6,11 @@ edition = "2021"
[dependencies] [dependencies]
common = { path = "../common" } common = { path = "../common" }
zeroize = "1.8.1"
sha2 = "0.10.8"
hkdf = "0.12.4"
aes-gcm = "0.10.3"
rsa = "0.9.8"
x25519-dalek = "2.0.1"
ed25519-dalek = {version="2.1.1", features=["rand_core", "serde", "pkcs8", "alloc" , "pem", "std"]}
rand = "0.9.1"
+8
View File
@@ -4,3 +4,11 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
zeroize = "1.8.1"
sha2 = "0.10.8"
hkdf = "0.12.4"
aes-gcm = "0.10.3"
rsa = "0.9.8"
x25519-dalek = "2.0.1"
ed25519-dalek = {version="2.1.1", features=["rand_core", "serde", "pkcs8", "alloc", "pem", "std"]}
rand = "0.9.1"
+15
View File
@@ -0,0 +1,15 @@
[package]
name = "cred-helper"
version = "0.1.0"
edition = "2021"
[dependencies]
zeroize = "1.8.1"
sha2 = "0.10.8"
hkdf = "0.12.4"
aes-gcm = "0.10.3"
rsa = "0.9.8"
x25519-dalek = "2.0.1"
ed25519-dalek = {version="2.1.1", features=["rand_core", "serde", "pkcs8", "alloc", "pem", "std"]}
rand = "0.9.1"
+26
View File
@@ -0,0 +1,26 @@
use std::{fs::File, io::Write};
use ed25519_dalek::pkcs8::EncodePrivateKey;
use aes_gcm::aead::OsRng;
use ed25519_dalek::pkcs8::EncodePublicKey;
use ed25519_dalek::{SigningKey, VerifyingKey};
use rsa::pkcs1::{EncodeRsaPrivateKey, EncodeRsaPublicKey};
fn main() {
println!("generating credentials for use with the remainder of the tooling for the Vault of Oblivion");
let mut csprng = OsRng;
let sign_private_key: SigningKey = SigningKey::generate(&mut csprng);
let verif_public_key: VerifyingKey = sign_private_key.verifying_key();
let pem_private = sign_private_key.to_pkcs8_pem(rsa::pkcs8::LineEnding::LF).unwrap();
let pem_public = verif_public_key.to_public_key_pem(rsa::pkcs8::LineEnding::LF).unwrap();
// write to corresponding files
let mut public_key_file: File = File::create("ed25519-pub.pem").unwrap();
let mut private_key_file: File = File::create("ed25519-private.pem").unwrap();
public_key_file.write_all(pem_public.as_bytes()).unwrap();
private_key_file.write_all(pem_private.as_bytes()).unwrap();
}
+4
View File
@@ -0,0 +1,4 @@
-----BEGIN PRIVATE KEY-----
MFECAQEwBQYDK2VwBCIEIG11H9SJ1YO+H9rFrRPeOaJ6kzSNzl+QSfIugiR7D87h
gSEAwFSLEh/ZYha2k2QYdNvasqJSOTN3+z8HALeMwNA3A/s=
-----END PRIVATE KEY-----
+3
View File
@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAwFSLEh/ZYha2k2QYdNvasqJSOTN3+z8HALeMwNA3A/s=
-----END PUBLIC KEY-----
+1 -1
View File
@@ -1,7 +1,7 @@
# Steps in the auth scheme # Steps in the auth scheme
1. sever issues a packet with an PoW challenge 1. sever issues a packet with an PoW challenge
2. client breaks the challenge, and send the data encrypted by its RSA private key 2. client breaks the challenge, and send the data encrypted by its eliptical signing private key
3. server checks against all public keys on file till the right matching one is found 3. server checks against all public keys on file till the right matching one is found
4. server sends ephemeral public key | possible second layer security 4. server sends ephemeral public key | possible second layer security
5. client sends ephemeral public key | possible second layer security 5. client sends ephemeral public key | possible second layer security
+8 -1
View File
@@ -6,4 +6,11 @@ edition = "2021"
[dependencies] [dependencies]
common = { path = "../common" } common = { path = "../common" }
zeroize = "1.8.1"
sha2 = "0.10.8"
hkdf = "0.12.4"
aes-gcm = "0.10.3"
rsa = "0.9.8"
x25519-dalek = "2.0.1"
ed25519-dalek = {version="2.1.1", features=["rand_core", "serde", "pkcs8", "alloc" , "pem", "std"]}
rand = "0.9.1"
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
4bd75703aef73d9a
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"alloc\", \"getrandom\", \"rand_core\"]","declared_features":"[\"alloc\", \"arrayvec\", \"blobby\", \"bytes\", \"default\", \"dev\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\"]","target":3096207997967742183,"profile":12206360443249279867,"path":11689310226858697129,"deps":[[9665562089965330559,"generic_array",false,14299535879643886960],[15349877456970498084,"crypto_common",false,7307577576269534285]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-a1e61e5de28116e5/dep-lib-aead","checksum":false}}],"rustflags":[],"metadata":16281996927225795491,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
d9fb1698178c2886
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"alloc\", \"getrandom\", \"rand_core\"]","declared_features":"[\"alloc\", \"arrayvec\", \"blobby\", \"bytes\", \"default\", \"dev\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\"]","target":3096207997967742183,"profile":10243973527296709326,"path":11689310226858697129,"deps":[[9665562089965330559,"generic_array",false,7100852187587958385],[15349877456970498084,"crypto_common",false,718564413015462901]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-a2b2004da30ddc25/dep-lib-aead","checksum":false}}],"rustflags":[],"metadata":16281996927225795491,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
c85f9cb8a19a58b1
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"hazmat\", \"zeroize\"]","target":2638140091469314153,"profile":10243973527296709326,"path":14000114347570183799,"deps":[[2452538001284770427,"cfg_if",false,1766970609980034176],[3466895187879538740,"cpufeatures",false,2434115586253689542],[4824270032984628517,"cipher",false,4093978284861487802]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-b721ee07c560ac92/dep-lib-aes","checksum":false}}],"rustflags":[],"metadata":14679050817507519468,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
f664a5daecf5b711
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"hazmat\", \"zeroize\"]","target":2638140091469314153,"profile":12206360443249279867,"path":14000114347570183799,"deps":[[2452538001284770427,"cfg_if",false,17848453214681210762],[3466895187879538740,"cpufeatures",false,14541570809541263917],[4824270032984628517,"cipher",false,6649382317939842218]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-cae944af9a96e042/dep-lib-aes","checksum":false}}],"rustflags":[],"metadata":14679050817507519468,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
06ec71bfd3484651
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"aes\", \"alloc\", \"default\", \"getrandom\", \"rand_core\"]","declared_features":"[\"aes\", \"alloc\", \"arrayvec\", \"default\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\", \"zeroize\"]","target":7600215241494552598,"profile":12206360443249279867,"path":13979731080319891592,"deps":[[1486664334664968274,"subtle",false,7967115008921125322],[1894550379913555986,"aead",false,11114311782172710731],[4016014103291263000,"ghash",false,3279195305681226691],[4824270032984628517,"cipher",false,6649382317939842218],[4904117634341515169,"ctr",false,3114053347219571126],[15886012599978490226,"aes",false,1276759417012184310]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-gcm-731db9e0f7bbd910/dep-lib-aes_gcm","checksum":false}}],"rustflags":[],"metadata":5892626930301612943,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
f95005270ae684f1
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"aes\", \"alloc\", \"default\", \"getrandom\", \"rand_core\"]","declared_features":"[\"aes\", \"alloc\", \"arrayvec\", \"default\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\", \"zeroize\"]","target":7600215241494552598,"profile":10243973527296709326,"path":13979731080319891592,"deps":[[1486664334664968274,"subtle",false,3579259922134057757],[1894550379913555986,"aead",false,9667130633114549209],[4016014103291263000,"ghash",false,17338399453661331944],[4824270032984628517,"cipher",false,4093978284861487802],[4904117634341515169,"ctr",false,6061024860700895482],[15886012599978490226,"aes",false,12779133962041450440]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-gcm-bd06d453259832c1/dep-lib-aes_gcm","checksum":false}}],"rustflags":[],"metadata":5892626930301612943,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
7f4128fb2bf76c26
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":4416014774196737203,"profile":13232757476167777671,"path":13747798835184727943,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/autocfg-fa673ec83f7410be/dep-lib-autocfg","checksum":false}}],"rustflags":[],"metadata":13102859075309379048,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
2154df0de7bc20e4
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"std\"]","target":11336220669418887160,"profile":10243973527296709326,"path":9723222811997982403,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/base64ct-bd4b98e47329659d/dep-lib-base64ct","checksum":false}}],"rustflags":[],"metadata":1839304601661593292,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
b902cd0307cac73f
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"std\"]","target":11336220669418887160,"profile":12206360443249279867,"path":9723222811997982403,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/base64ct-bd9e39c29e907113/dep-lib-base64ct","checksum":false}}],"rustflags":[],"metadata":1839304601661593292,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
322a9656ce655c07
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":12346826633121798899,"profile":10243973527296709326,"path":4349458597300550834,"deps":[[9665562089965330559,"generic_array",false,7100852187587958385]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/block-buffer-30051b6303d91691/dep-lib-block_buffer","checksum":false}}],"rustflags":[],"metadata":5573904726092117450,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
c3f663cd9215ae55
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":12346826633121798899,"profile":12206360443249279867,"path":4349458597300550834,"deps":[[9665562089965330559,"generic_array",false,14299535879643886960]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/block-buffer-8cf524b3ae74b858/dep-lib-block_buffer","checksum":false}}],"rustflags":[],"metadata":5573904726092117450,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
caefcd3a6faddef2
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"default\", \"i128\", \"std\"]","target":16903832911151110546,"profile":12206360443249279867,"path":13732086428035999264,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/byteorder-d36d73da0d12e75b/dep-lib-byteorder","checksum":false}}],"rustflags":[],"metadata":5398730104718078656,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
08f979362423a3cb
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"default\", \"i128\", \"std\"]","target":16903832911151110546,"profile":10243973527296709326,"path":13732086428035999264,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/byteorder-db27a0ce4506c654/dep-lib-byteorder","checksum":false}}],"rustflags":[],"metadata":5398730104718078656,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
8a9f4033a271b2f7
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"compiler_builtins\", \"core\", \"rustc-dep-of-std\"]","target":11601024444410784892,"profile":12206360443249279867,"path":16941108941403741703,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-8217498f8667ada9/dep-lib-cfg_if","checksum":false}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
804c6a70688a8518
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"compiler_builtins\", \"core\", \"rustc-dep-of-std\"]","target":11601024444410784892,"profile":10243973527296709326,"path":16941108941403741703,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-f1126d5e99956cbe/dep-lib-cfg_if","checksum":false}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
aa5c91fcfc59475c
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"alloc\", \"blobby\", \"block-padding\", \"dev\", \"rand_core\", \"std\", \"zeroize\"]","target":1290692419478546684,"profile":12206360443249279867,"path":8995424437025579301,"deps":[[4060399932970669737,"inout",false,17864277209305110629],[15349877456970498084,"crypto_common",false,7307577576269534285]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cipher-12b9fd1fdd2cf284/dep-lib-cipher","checksum":false}}],"rustflags":[],"metadata":8273356103737446388,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
bafa542b8fbbd038
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[\"alloc\", \"blobby\", \"block-padding\", \"dev\", \"rand_core\", \"std\", \"zeroize\"]","target":1290692419478546684,"profile":10243973527296709326,"path":8995424437025579301,"deps":[[4060399932970669737,"inout",false,14345495446458698902],[15349877456970498084,"crypto_common",false,718564413015462901]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cipher-623c62b821e43e59/dep-lib-cipher","checksum":false}}],"rustflags":[],"metadata":8273356103737446388,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
47662e699572b7e3
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":11597332650809196192,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,13969702259799124071],[5036014088472469875,"rsa",false,16036955133002179939],[6207214873101797754,"common",false,5770034465442205991],[10695905396679492879,"sha2",false,451470171034946550],[13573032141366914255,"ed25519_dalek",false,954999538646800212],[16190313859140346100,"hkdf",false,17162933563389080477],[16255406213544131105,"zeroize",false,15872439165127901191],[17159799409689516886,"aes_gcm",false,5856448439729122310]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-0563ef60f60754db/dep-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
c07e50efc74510b8
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":11983525691607113661,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,1758312300996020354],[5036014088472469875,"rsa",false,5101793281464027447],[6207214873101797754,"common",false,7846539787086161398],[9487495613121741433,"rand",false,142189949779099502],[10695905396679492879,"sha2",false,7409805201846020318],[13573032141366914255,"ed25519_dalek",false,15854065368391776786],[16190313859140346100,"hkdf",false,2831036626085256371],[16255406213544131105,"zeroize",false,14324076554250972927],[17159799409689516886,"aes_gcm",false,17403287791345160441]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-0ac875223d3e05a6/dep-test-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
71d759d2ac8bf548
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":5601947868832436996,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,1758312300996020354],[5036014088472469875,"rsa",false,5101793281464027447],[6207214873101797754,"common",false,7874028941084863380],[10695905396679492879,"sha2",false,7409805201846020318],[13573032141366914255,"ed25519_dalek",false,15854065368391776786],[16190313859140346100,"hkdf",false,2831036626085256371],[16255406213544131105,"zeroize",false,14324076554250972927],[17159799409689516886,"aes_gcm",false,17403287791345160441]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-0f54cd49a58068f5/dep-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
403ac7dd84d2c7fc
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":5601947868832436996,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,79856852121626240],[5036014088472469875,"rsa",false,9431998860414399938],[6207214873101797754,"common",false,10849078397364016977],[10695905396679492879,"sha2",false,7409805201846020318],[16190313859140346100,"hkdf",false,2831036626085256371],[16255406213544131105,"zeroize",false,14324076554250972927],[17159799409689516886,"aes_gcm",false,17403287791345160441]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-138e1c0b7e11926a/dep-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
cae2ee015e288256
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":11983525691607113661,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,79856852121626240],[5036014088472469875,"rsa",false,9431998860414399938],[6207214873101797754,"common",false,10849078397364016977],[10695905396679492879,"sha2",false,7409805201846020318],[16190313859140346100,"hkdf",false,2831036626085256371],[16255406213544131105,"zeroize",false,14324076554250972927],[17159799409689516886,"aes_gcm",false,17403287791345160441]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-160d1890626f36e9/dep-test-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
98fe361a19935e21
@@ -0,0 +1 @@
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":1444767327470238010,"profile":5601947868832436996,"path":7472433242183518160,"deps":[[4476185667064834509,"x25519_dalek",false,1758312300996020354],[5036014088472469875,"rsa",false,5101793281464027447],[6207214873101797754,"common",false,7846539787086161398],[10695905396679492879,"sha2",false,7409805201846020318],[13573032141366914255,"ed25519_dalek",false,15854065368391776786],[16190313859140346100,"hkdf",false,2831036626085256371],[16255406213544131105,"zeroize",false,14324076554250972927],[17159799409689516886,"aes_gcm",false,17403287791345160441]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/client-2474d6971158c300/dep-bin-client","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
@@ -0,0 +1 @@
This file has an mtime of when this was started.

Some files were not shown because too many files have changed in this diff Show More