Bevy+Ratutui powered Monitoring of Pico-Strike devices
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to wharrgarbl

+237 -389
+178 -332
Cargo.lock
··· 55 55 checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" 56 56 dependencies = [ 57 57 "android-properties", 58 - "bitflags 2.11.0", 58 + "bitflags 2.11.1", 59 59 "cc", 60 60 "jni", 61 61 "libc", ··· 211 211 dependencies = [ 212 212 "backtrace", 213 213 ] 214 - 215 - [[package]] 216 - name = "base16ct" 217 - version = "1.0.0" 218 - source = "registry+https://github.com/rust-lang/crates.io-index" 219 - checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" 220 214 221 215 [[package]] 222 216 name = "base64" ··· 340 334 "bevy_reflect", 341 335 "bevy_tasks", 342 336 "bevy_utils", 343 - "bitflags 2.11.0", 337 + "bitflags 2.11.1", 344 338 "bumpalo", 345 339 "concurrent-queue", 346 340 "derive_more", ··· 469 463 "glam", 470 464 "itertools", 471 465 "libm", 472 - "rand 0.9.2", 466 + "rand 0.9.4", 473 467 "rand_distr", 474 468 "serde", 475 469 "thiserror 2.0.18", ··· 509 503 checksum = "e24368df4cff95c92448a33c46f7db4ff51016a3024d27bd2daa49d0e3ce03f4" 510 504 dependencies = [ 511 505 "bevy", 512 - "bitflags 2.11.0", 506 + "bitflags 2.11.1", 513 507 "color-eyre", 514 508 "ratatui", 515 509 "tracing", ··· 686 680 687 681 [[package]] 688 682 name = "bitflags" 689 - version = "2.11.0" 683 + version = "2.11.1" 690 684 source = "registry+https://github.com/rust-lang/crates.io-index" 691 - checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" 685 + checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" 692 686 dependencies = [ 693 687 "serde_core", 694 688 ] ··· 769 763 770 764 [[package]] 771 765 name = "cc" 772 - version = "1.2.58" 766 + version = "1.2.60" 773 767 source = "registry+https://github.com/rust-lang/crates.io-index" 774 - checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1" 768 + checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" 775 769 dependencies = [ 776 770 "find-msvc-tools", 777 771 "jobserver", ··· 792 786 checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 793 787 794 788 [[package]] 795 - name = "chacha20" 796 - version = "0.10.0" 797 - source = "registry+https://github.com/rust-lang/crates.io-index" 798 - checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" 799 - dependencies = [ 800 - "cfg-if", 801 - "cipher", 802 - "cpufeatures 0.3.0", 803 - ] 804 - 805 - [[package]] 806 - name = "chacha20poly1305" 807 - version = "0.11.0-rc.3" 808 - source = "registry+https://github.com/rust-lang/crates.io-index" 809 - checksum = "1c9ed179664f12fd6f155f6dd632edf5f3806d48c228c67ff78366f2a0eb6b5e" 810 - dependencies = [ 811 - "aead", 812 - "chacha20", 813 - "cipher", 814 - "poly1305", 815 - ] 816 - 817 - [[package]] 818 - name = "cipher" 819 - version = "0.5.1" 820 - source = "registry+https://github.com/rust-lang/crates.io-index" 821 - checksum = "e34d8227fe1ba289043aeb13792056ff80fd6de1a9f49137a5f499de8e8c78ea" 822 - dependencies = [ 823 - "block-buffer 0.12.0", 824 - "crypto-common 0.2.1", 825 - "inout", 826 - ] 827 - 828 - [[package]] 829 789 name = "cmov" 830 - version = "0.5.2" 790 + version = "0.5.3" 831 791 source = "registry+https://github.com/rust-lang/crates.io-index" 832 - checksum = "de0758edba32d61d1fd9f4d69491b47604b91ee2f7e6b33de7e54ca4ebe55dc3" 792 + checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" 833 793 834 794 [[package]] 835 795 name = "cobs" ··· 918 878 checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" 919 879 920 880 [[package]] 921 - name = "const-oid" 922 - version = "0.10.2" 923 - source = "registry+https://github.com/rust-lang/crates.io-index" 924 - checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" 925 - 926 - [[package]] 927 881 name = "convert_case" 928 882 version = "0.10.0" 929 883 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 931 885 dependencies = [ 932 886 "unicode-segmentation", 933 887 ] 934 - 935 - [[package]] 936 - name = "cpubits" 937 - version = "0.1.0" 938 - source = "registry+https://github.com/rust-lang/crates.io-index" 939 - checksum = "5ef0c543070d296ea414df2dd7625d1b24866ce206709d8a4a424f28377f5861" 940 888 941 889 [[package]] 942 890 name = "cpufeatures" ··· 992 940 source = "registry+https://github.com/rust-lang/crates.io-index" 993 941 checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" 994 942 dependencies = [ 995 - "bitflags 2.11.0", 943 + "bitflags 2.11.1", 996 944 "crossterm_winapi", 997 945 "derive_more", 998 946 "document-features", ··· 1014 962 ] 1015 963 1016 964 [[package]] 1017 - name = "crypto-bigint" 1018 - version = "0.7.3" 1019 - source = "registry+https://github.com/rust-lang/crates.io-index" 1020 - checksum = "42a0d26b245348befa0c121944541476763dcc46ede886c88f9d12e1697d27c3" 1021 - dependencies = [ 1022 - "cpubits", 1023 - "ctutils", 1024 - "getrandom 0.4.2", 1025 - "hybrid-array", 1026 - "num-traits", 1027 - "rand_core 0.10.0", 1028 - "subtle", 1029 - "zeroize", 1030 - ] 1031 - 1032 - [[package]] 1033 965 name = "crypto-common" 1034 966 version = "0.1.7" 1035 967 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1045 977 source = "registry+https://github.com/rust-lang/crates.io-index" 1046 978 checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" 1047 979 dependencies = [ 1048 - "getrandom 0.4.2", 1049 980 "hybrid-array", 1050 - "rand_core 0.10.0", 981 + "rand_core 0.10.1", 1051 982 ] 1052 983 1053 984 [[package]] ··· 1073 1004 1074 1005 [[package]] 1075 1006 name = "ctutils" 1076 - version = "0.4.0" 1007 + version = "0.4.2" 1077 1008 source = "registry+https://github.com/rust-lang/crates.io-index" 1078 - checksum = "1005a6d4446f5120ef475ad3d2af2b30c49c2c9c6904258e3bb30219bebed5e4" 1009 + checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" 1079 1010 dependencies = [ 1080 1011 "cmov", 1081 - "subtle", 1082 1012 ] 1083 1013 1084 1014 [[package]] ··· 1122 1052 checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" 1123 1053 1124 1054 [[package]] 1125 - name = "der" 1126 - version = "0.8.0" 1127 - source = "registry+https://github.com/rust-lang/crates.io-index" 1128 - checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" 1129 - dependencies = [ 1130 - "const-oid", 1131 - "zeroize", 1132 - ] 1133 - 1134 - [[package]] 1135 1055 name = "deranged" 1136 1056 version = "0.5.8" 1137 1057 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1164 1084 ] 1165 1085 1166 1086 [[package]] 1167 - name = "dhkem" 1168 - version = "0.1.0-rc.0" 1169 - source = "git+https://github.com/RustCrypto/KEMs?rev=2d277162e0c5ed1c53bb315d0c0dace394cba70a#2d277162e0c5ed1c53bb315d0c0dace394cba70a" 1170 - dependencies = [ 1171 - "elliptic-curve", 1172 - "hkdf", 1173 - "k256", 1174 - "kem", 1175 - "rand_core 0.10.0", 1176 - "zeroize", 1177 - ] 1178 - 1179 - [[package]] 1180 1087 name = "digest" 1181 1088 version = "0.10.7" 1182 1089 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1194 1101 dependencies = [ 1195 1102 "block-buffer 0.12.0", 1196 1103 "crypto-common 0.2.1", 1197 - "ctutils", 1198 1104 ] 1199 1105 1200 1106 [[package]] ··· 1203 1109 source = "registry+https://github.com/rust-lang/crates.io-index" 1204 1110 checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" 1205 1111 dependencies = [ 1206 - "bitflags 2.11.0", 1112 + "bitflags 2.11.1", 1207 1113 "block2", 1208 1114 "libc", 1209 1115 "objc2", ··· 1231 1137 checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" 1232 1138 1233 1139 [[package]] 1234 - name = "ecdsa" 1235 - version = "0.17.0-rc.16" 1236 - source = "registry+https://github.com/rust-lang/crates.io-index" 1237 - checksum = "91bbdd377139884fafcad8dc43a760a3e1e681aa26db910257fa6535b70e1829" 1238 - dependencies = [ 1239 - "der", 1240 - "elliptic-curve", 1241 - "signature", 1242 - "zeroize", 1243 - ] 1244 - 1245 - [[package]] 1246 1140 name = "either" 1247 1141 version = "1.15.0" 1248 1142 source = "registry+https://github.com/rust-lang/crates.io-index" 1249 1143 checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 1250 - 1251 - [[package]] 1252 - name = "elliptic-curve" 1253 - version = "0.14.0-rc.29" 1254 - source = "registry+https://github.com/rust-lang/crates.io-index" 1255 - checksum = "e84043d573efd4ac9d2d125817979a379204bf7e328b25a4a30487e8d100e618" 1256 - dependencies = [ 1257 - "base16ct", 1258 - "crypto-bigint", 1259 - "crypto-common 0.2.1", 1260 - "digest 0.11.2", 1261 - "hkdf", 1262 - "hybrid-array", 1263 - "rand_core 0.10.0", 1264 - "rustcrypto-ff", 1265 - "rustcrypto-group", 1266 - "sec1", 1267 - "subtle", 1268 - "zeroize", 1269 - ] 1270 1144 1271 1145 [[package]] 1272 1146 name = "embedded-io" ··· 1359 1233 1360 1234 [[package]] 1361 1235 name = "fastrand" 1362 - version = "2.3.0" 1236 + version = "2.4.1" 1363 1237 source = "registry+https://github.com/rust-lang/crates.io-index" 1364 - checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 1238 + checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" 1365 1239 1366 1240 [[package]] 1367 1241 name = "filedescriptor" ··· 1512 1386 "cfg-if", 1513 1387 "libc", 1514 1388 "r-efi 6.0.0", 1515 - "rand_core 0.10.0", 1389 + "rand_core 0.10.1", 1516 1390 "wasip2", 1517 1391 "wasip3", 1518 1392 ] ··· 1566 1440 ] 1567 1441 1568 1442 [[package]] 1443 + name = "hashbrown" 1444 + version = "0.17.0" 1445 + source = "registry+https://github.com/rust-lang/crates.io-index" 1446 + checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" 1447 + 1448 + [[package]] 1569 1449 name = "heapless" 1570 1450 version = "0.9.2" 1571 1451 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1595 1475 checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1596 1476 1597 1477 [[package]] 1598 - name = "hkdf" 1599 - version = "0.13.0" 1600 - source = "registry+https://github.com/rust-lang/crates.io-index" 1601 - checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" 1602 - dependencies = [ 1603 - "hmac", 1604 - ] 1605 - 1606 - [[package]] 1607 - name = "hmac" 1608 - version = "0.13.0" 1609 - source = "registry+https://github.com/rust-lang/crates.io-index" 1610 - checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" 1611 - dependencies = [ 1612 - "digest 0.11.2", 1613 - ] 1614 - 1615 - [[package]] 1616 1478 name = "hybrid-array" 1617 1479 version = "0.4.10" 1618 1480 source = "registry+https://github.com/rust-lang/crates.io-index" 1619 1481 checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" 1620 1482 dependencies = [ 1621 - "subtle", 1483 + "ctutils", 1622 1484 "typenum", 1623 1485 "zeroize", 1624 1486 ] ··· 1643 1505 1644 1506 [[package]] 1645 1507 name = "indexmap" 1646 - version = "2.13.0" 1508 + version = "2.14.0" 1647 1509 source = "registry+https://github.com/rust-lang/crates.io-index" 1648 - checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" 1510 + checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" 1649 1511 dependencies = [ 1650 1512 "equivalent", 1651 - "hashbrown 0.16.1", 1513 + "hashbrown 0.17.0", 1652 1514 "serde", 1653 1515 "serde_core", 1654 1516 ] ··· 1816 1678 1817 1679 [[package]] 1818 1680 name = "js-sys" 1819 - version = "0.3.94" 1681 + version = "0.3.95" 1820 1682 source = "registry+https://github.com/rust-lang/crates.io-index" 1821 - checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" 1683 + checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" 1822 1684 dependencies = [ 1823 1685 "cfg-if", 1824 1686 "futures-util", 1825 1687 "once_cell", 1826 1688 "wasm-bindgen", 1827 - ] 1828 - 1829 - [[package]] 1830 - name = "k256" 1831 - version = "0.14.0-rc.8" 1832 - source = "registry+https://github.com/rust-lang/crates.io-index" 1833 - checksum = "f7d2c6c227649d5ec80eaae541f1736232641a0bcdb3062a52b34edb42054158" 1834 - dependencies = [ 1835 - "cpubits", 1836 - "ecdsa", 1837 - "elliptic-curve", 1838 1689 ] 1839 1690 1840 1691 [[package]] ··· 1849 1700 ] 1850 1701 1851 1702 [[package]] 1703 + name = "keccak" 1704 + version = "0.2.0" 1705 + source = "registry+https://github.com/rust-lang/crates.io-index" 1706 + checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa" 1707 + dependencies = [ 1708 + "cfg-if", 1709 + "cpufeatures 0.3.0", 1710 + "hybrid-array", 1711 + ] 1712 + 1713 + [[package]] 1852 1714 name = "kem" 1853 - version = "0.3.0-rc.6" 1715 + version = "0.3.0" 1854 1716 source = "registry+https://github.com/rust-lang/crates.io-index" 1855 - checksum = "e3ae2c3347ff4a7af4f679a9e397c2c7e6034a00b773dd2dd3c001d7f40897c9" 1717 + checksum = "01737161ba802849cfd486b5bd209d38ba4943494c249a8126005170c7621edd" 1856 1718 dependencies = [ 1857 1719 "crypto-common 0.2.1", 1858 - "rand_core 0.10.0", 1720 + "rand_core 0.10.1", 1859 1721 ] 1860 1722 1861 1723 [[package]] ··· 1878 1740 1879 1741 [[package]] 1880 1742 name = "libc" 1881 - version = "0.2.184" 1743 + version = "0.2.185" 1882 1744 source = "registry+https://github.com/rust-lang/crates.io-index" 1883 - checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" 1745 + checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" 1884 1746 1885 1747 [[package]] 1886 1748 name = "libm" ··· 1894 1756 source = "registry+https://github.com/rust-lang/crates.io-index" 1895 1757 checksum = "3f50e8f47623268b5407192d26876c4d7f89d686ca130fdc53bced4814cd29f8" 1896 1758 dependencies = [ 1897 - "bitflags 2.11.0", 1759 + "bitflags 2.11.1", 1898 1760 ] 1899 1761 1900 1762 [[package]] ··· 1926 1788 1927 1789 [[package]] 1928 1790 name = "lru" 1929 - version = "0.16.3" 1791 + version = "0.16.4" 1930 1792 source = "registry+https://github.com/rust-lang/crates.io-index" 1931 - checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" 1793 + checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" 1932 1794 dependencies = [ 1933 1795 "hashbrown 0.16.1", 1934 1796 ] ··· 2031 1893 ] 2032 1894 2033 1895 [[package]] 1896 + name = "ml-kem" 1897 + version = "0.3.0-rc.2" 1898 + source = "registry+https://github.com/rust-lang/crates.io-index" 1899 + checksum = "04437cb1a66c0b78740927b76cc61f218344b9f6ef3dd430e283274a718ef0e9" 1900 + dependencies = [ 1901 + "hybrid-array", 1902 + "kem", 1903 + "module-lattice", 1904 + "rand_core 0.10.1", 1905 + "sha3", 1906 + "zeroize", 1907 + ] 1908 + 1909 + [[package]] 1910 + name = "module-lattice" 1911 + version = "0.2.1" 1912 + source = "registry+https://github.com/rust-lang/crates.io-index" 1913 + checksum = "164eb3faeaecbd14b0b2a917c1b4d0c035097a9c559b0bed85c2cdd032bc8faa" 1914 + dependencies = [ 1915 + "ctutils", 1916 + "hybrid-array", 1917 + "num-traits", 1918 + "zeroize", 1919 + ] 1920 + 1921 + [[package]] 2034 1922 name = "ndk" 2035 1923 version = "0.9.0" 2036 1924 source = "registry+https://github.com/rust-lang/crates.io-index" 2037 1925 checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" 2038 1926 dependencies = [ 2039 - "bitflags 2.11.0", 1927 + "bitflags 2.11.1", 2040 1928 "jni-sys 0.3.1", 2041 1929 "log", 2042 1930 "ndk-sys", ··· 2065 1953 source = "registry+https://github.com/rust-lang/crates.io-index" 2066 1954 checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" 2067 1955 dependencies = [ 2068 - "bitflags 2.11.0", 1956 + "bitflags 2.11.1", 2069 1957 "cfg-if", 2070 1958 "cfg_aliases", 2071 1959 "libc", ··· 2078 1966 source = "registry+https://github.com/rust-lang/crates.io-index" 2079 1967 checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" 2080 1968 dependencies = [ 2081 - "bitflags 2.11.0", 1969 + "bitflags 2.11.1", 2082 1970 "cfg-if", 2083 1971 "cfg_aliases", 2084 1972 "libc", ··· 2281 2169 checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" 2282 2170 dependencies = [ 2283 2171 "pest", 2284 - "sha2 0.10.9", 2172 + "sha2", 2285 2173 ] 2286 2174 2287 2175 [[package]] ··· 2311 2199 checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" 2312 2200 dependencies = [ 2313 2201 "phf_shared", 2314 - "rand 0.8.5", 2202 + "rand 0.8.6", 2315 2203 ] 2316 2204 2317 2205 [[package]] ··· 2377 2265 ] 2378 2266 2379 2267 [[package]] 2380 - name = "poly1305" 2381 - version = "0.9.0-rc.6" 2382 - source = "registry+https://github.com/rust-lang/crates.io-index" 2383 - checksum = "19feddcbdf17fad33f40041c7f9e768faf19455f32a6d52ba1b8b65ffc7b1cae" 2384 - dependencies = [ 2385 - "cpufeatures 0.3.0", 2386 - "universal-hash", 2387 - ] 2388 - 2389 - [[package]] 2390 2268 name = "portable-atomic" 2391 2269 version = "1.13.1" 2392 2270 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2394 2272 2395 2273 [[package]] 2396 2274 name = "portable-atomic-util" 2397 - version = "0.2.6" 2275 + version = "0.2.7" 2398 2276 source = "registry+https://github.com/rust-lang/crates.io-index" 2399 - checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" 2277 + checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" 2400 2278 dependencies = [ 2401 2279 "portable-atomic", 2402 2280 ] ··· 2444 2322 source = "registry+https://github.com/rust-lang/crates.io-index" 2445 2323 checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" 2446 2324 dependencies = [ 2447 - "toml_edit 0.25.10+spec-1.1.0", 2325 + "toml_edit 0.25.11+spec-1.1.0", 2448 2326 ] 2449 2327 2450 2328 [[package]] ··· 2479 2357 2480 2358 [[package]] 2481 2359 name = "rand" 2482 - version = "0.8.5" 2360 + version = "0.8.6" 2483 2361 source = "registry+https://github.com/rust-lang/crates.io-index" 2484 - checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2362 + checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" 2485 2363 dependencies = [ 2486 2364 "rand_core 0.6.4", 2487 2365 ] 2488 2366 2489 2367 [[package]] 2490 2368 name = "rand" 2491 - version = "0.9.2" 2369 + version = "0.9.4" 2492 2370 source = "registry+https://github.com/rust-lang/crates.io-index" 2493 - checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 2371 + checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" 2494 2372 dependencies = [ 2495 2373 "rand_chacha", 2496 2374 "rand_core 0.9.5", ··· 2523 2401 2524 2402 [[package]] 2525 2403 name = "rand_core" 2526 - version = "0.10.0" 2404 + version = "0.10.1" 2527 2405 source = "registry+https://github.com/rust-lang/crates.io-index" 2528 - checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" 2406 + checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" 2529 2407 2530 2408 [[package]] 2531 2409 name = "rand_distr" ··· 2534 2412 checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" 2535 2413 dependencies = [ 2536 2414 "num-traits", 2537 - "rand 0.9.2", 2415 + "rand 0.9.4", 2538 2416 ] 2539 2417 2540 2418 [[package]] ··· 2543 2421 source = "registry+https://github.com/rust-lang/crates.io-index" 2544 2422 checksum = "b5e48930979c155e2f33aa36ab3119b5ee81332beb6482199a8ecd6029b80b59" 2545 2423 dependencies = [ 2546 - "rand 0.9.2", 2424 + "rand 0.9.4", 2547 2425 "rustversion", 2548 2426 ] 2549 2427 ··· 2567 2445 source = "registry+https://github.com/rust-lang/crates.io-index" 2568 2446 checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293" 2569 2447 dependencies = [ 2570 - "bitflags 2.11.0", 2448 + "bitflags 2.11.1", 2571 2449 "compact_str", 2572 2450 "hashbrown 0.16.1", 2573 2451 "indoc", ··· 2619 2497 source = "registry+https://github.com/rust-lang/crates.io-index" 2620 2498 checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" 2621 2499 dependencies = [ 2622 - "bitflags 2.11.0", 2500 + "bitflags 2.11.1", 2623 2501 "hashbrown 0.16.1", 2624 2502 "indoc", 2625 2503 "instability", ··· 2644 2522 source = "registry+https://github.com/rust-lang/crates.io-index" 2645 2523 checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" 2646 2524 dependencies = [ 2647 - "bitflags 2.11.0", 2525 + "bitflags 2.11.1", 2648 2526 ] 2649 2527 2650 2528 [[package]] ··· 2692 2570 ] 2693 2571 2694 2572 [[package]] 2695 - name = "rustcrypto-ff" 2696 - version = "0.14.0-rc.1" 2697 - source = "registry+https://github.com/rust-lang/crates.io-index" 2698 - checksum = "fd2a8adb347447693cd2ba0d218c4b66c62da9b0a5672b17b981e4291ec65ff6" 2699 - dependencies = [ 2700 - "rand_core 0.10.0", 2701 - "subtle", 2702 - ] 2703 - 2704 - [[package]] 2705 - name = "rustcrypto-group" 2706 - version = "0.14.0-rc.1" 2707 - source = "registry+https://github.com/rust-lang/crates.io-index" 2708 - checksum = "369f9b61aa45933c062c9f6b5c3c50ab710687eca83dd3802653b140b43f85ed" 2709 - dependencies = [ 2710 - "rand_core 0.10.0", 2711 - "rustcrypto-ff", 2712 - "subtle", 2713 - ] 2714 - 2715 - [[package]] 2716 2573 name = "rustix" 2717 2574 version = "1.1.4" 2718 2575 source = "registry+https://github.com/rust-lang/crates.io-index" 2719 2576 checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" 2720 2577 dependencies = [ 2721 - "bitflags 2.11.0", 2578 + "bitflags 2.11.1", 2722 2579 "errno", 2723 2580 "libc", 2724 2581 "linux-raw-sys", ··· 2740 2597 [[package]] 2741 2598 name = "sachy-config" 2742 2599 version = "0.1.0" 2743 - source = "git+https://tangled.org/sachy.dev/sachy-embed-core#7e8218e9f40024412b7d813bf5052ed83036e3f3" 2600 + source = "git+https://tangled.org/sachy.dev/sachy-embed-core#dddae293fb28a8d70f2b5a77f2992234ab65db4b" 2744 2601 dependencies = [ 2745 2602 "base64ct", 2746 2603 "miette", 2747 - "toml_edit 0.25.10+spec-1.1.0", 2748 - ] 2749 - 2750 - [[package]] 2751 - name = "sachy-crypto" 2752 - version = "0.1.0" 2753 - source = "git+https://tangled.org/sachy.dev/sachy-embed-core#7e8218e9f40024412b7d813bf5052ed83036e3f3" 2754 - dependencies = [ 2755 - "chacha20poly1305", 2756 - "dhkem", 2757 - "elliptic-curve", 2758 - "k256", 2759 - "sha2 0.11.0-rc.5", 2604 + "toml_edit 0.25.11+spec-1.1.0", 2760 2605 ] 2761 2606 2762 2607 [[package]] 2763 2608 name = "sachy-fmt" 2764 2609 version = "0.1.0" 2765 - source = "git+https://tangled.org/sachy.dev/sachy-embed-core#7e8218e9f40024412b7d813bf5052ed83036e3f3" 2610 + source = "git+https://tangled.org/sachy.dev/sachy-embed-core#dddae293fb28a8d70f2b5a77f2992234ab65db4b" 2766 2611 2767 2612 [[package]] 2768 2613 name = "sachy-mdns" 2769 2614 version = "0.1.0" 2770 - source = "git+https://tangled.org/sachy.dev/sachy-embed-core#7e8218e9f40024412b7d813bf5052ed83036e3f3" 2615 + source = "git+https://tangled.org/sachy.dev/sachy-embed-core#dddae293fb28a8d70f2b5a77f2992234ab65db4b" 2771 2616 dependencies = [ 2772 2617 "sachy-fmt", 2773 2618 "winnow 0.7.15", ··· 2787 2632 version = "1.2.0" 2788 2633 source = "registry+https://github.com/rust-lang/crates.io-index" 2789 2634 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2790 - 2791 - [[package]] 2792 - name = "sec1" 2793 - version = "0.8.1" 2794 - source = "registry+https://github.com/rust-lang/crates.io-index" 2795 - checksum = "d56d437c2f19203ce5f7122e507831de96f3d2d4d3be5af44a0b0a09d8a80e4d" 2796 - dependencies = [ 2797 - "base16ct", 2798 - "ctutils", 2799 - "der", 2800 - "hybrid-array", 2801 - "subtle", 2802 - "zeroize", 2803 - ] 2804 2635 2805 2636 [[package]] 2806 2637 name = "semver" 2807 - version = "1.0.27" 2638 + version = "1.0.28" 2808 2639 source = "registry+https://github.com/rust-lang/crates.io-index" 2809 - checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" 2640 + checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" 2810 2641 2811 2642 [[package]] 2812 2643 name = "serde" ··· 2863 2694 ] 2864 2695 2865 2696 [[package]] 2866 - name = "sha2" 2867 - version = "0.11.0-rc.5" 2697 + name = "sha3" 2698 + version = "0.11.0" 2868 2699 source = "registry+https://github.com/rust-lang/crates.io-index" 2869 - checksum = "7c5f3b1e2dc8aad28310d8410bd4d7e180eca65fca176c52ab00d364475d0024" 2700 + checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1" 2870 2701 dependencies = [ 2871 - "cfg-if", 2872 - "cpufeatures 0.2.17", 2873 2702 "digest 0.11.2", 2703 + "keccak", 2874 2704 ] 2875 2705 2876 2706 [[package]] ··· 2920 2750 ] 2921 2751 2922 2752 [[package]] 2923 - name = "signature" 2924 - version = "3.0.0-rc.10" 2925 - source = "registry+https://github.com/rust-lang/crates.io-index" 2926 - checksum = "7f1880df446116126965eeec169136b2e0251dba37c6223bcc819569550edea3" 2927 - dependencies = [ 2928 - "rand_core 0.10.0", 2929 - ] 2930 - 2931 - [[package]] 2932 2753 name = "simd_cesu8" 2933 2754 version = "1.1.1" 2934 2755 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3022 2843 "bytes", 3023 2844 "color-eyre", 3024 2845 "crossterm", 3025 - "dhkem", 3026 2846 "futures-concurrency", 2847 + "getrandom 0.4.2", 3027 2848 "jiff", 3028 2849 "postcard", 3029 2850 "rapidhash", 3030 2851 "ratatui", 3031 2852 "sachy-config", 3032 - "sachy-crypto", 3033 2853 "sachy-mdns", 3034 2854 "serde", 3035 2855 "socket2", ··· 3041 2861 version = "0.1.0" 3042 2862 dependencies = [ 3043 2863 "aead", 3044 - "dhkem", 3045 2864 "postcard", 3046 - "sachy-crypto", 2865 + "rand_core 0.10.1", 3047 2866 "serde", 2867 + "wharrgarbl", 3048 2868 ] 3049 2869 3050 2870 [[package]] ··· 3075 2895 ] 3076 2896 3077 2897 [[package]] 3078 - name = "subtle" 3079 - version = "2.6.1" 3080 - source = "registry+https://github.com/rust-lang/crates.io-index" 3081 - checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 3082 - 3083 - [[package]] 3084 2898 name = "supports-color" 3085 2899 version = "3.0.2" 3086 2900 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3162 2976 dependencies = [ 3163 2977 "anyhow", 3164 2978 "base64", 3165 - "bitflags 2.11.0", 2979 + "bitflags 2.11.1", 3166 2980 "fancy-regex", 3167 2981 "filedescriptor", 3168 2982 "finl_unicode", ··· 3179 2993 "pest", 3180 2994 "pest_derive", 3181 2995 "phf", 3182 - "sha2 0.10.9", 2996 + "sha2", 3183 2997 "signal-hook", 3184 2998 "siphasher", 3185 2999 "terminfo", ··· 3308 3122 3309 3123 [[package]] 3310 3124 name = "toml_edit" 3311 - version = "0.25.10+spec-1.1.0" 3125 + version = "0.25.11+spec-1.1.0" 3312 3126 source = "registry+https://github.com/rust-lang/crates.io-index" 3313 - checksum = "a82418ca169e235e6c399a84e395ab6debeb3bc90edc959bf0f48647c6a32d1b" 3127 + checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" 3314 3128 dependencies = [ 3315 3129 "indexmap", 3316 3130 "toml_datetime 1.1.1+spec-1.1.0", ··· 3436 3250 3437 3251 [[package]] 3438 3252 name = "typenum" 3439 - version = "1.19.0" 3253 + version = "1.20.0" 3440 3254 source = "registry+https://github.com/rust-lang/crates.io-index" 3441 - checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" 3255 + checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" 3442 3256 3443 3257 [[package]] 3444 3258 name = "ucd-trie" ··· 3494 3308 checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 3495 3309 3496 3310 [[package]] 3497 - name = "universal-hash" 3498 - version = "0.6.1" 3499 - source = "registry+https://github.com/rust-lang/crates.io-index" 3500 - checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" 3501 - dependencies = [ 3502 - "crypto-common 0.2.1", 3503 - "ctutils", 3504 - ] 3505 - 3506 - [[package]] 3507 3311 name = "utf8parse" 3508 3312 version = "0.2.2" 3509 3313 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3511 3315 3512 3316 [[package]] 3513 3317 name = "uuid" 3514 - version = "1.23.0" 3318 + version = "1.23.1" 3515 3319 source = "registry+https://github.com/rust-lang/crates.io-index" 3516 - checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" 3320 + checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" 3517 3321 dependencies = [ 3518 3322 "atomic", 3519 3323 "getrandom 0.4.2", ··· 3572 3376 3573 3377 [[package]] 3574 3378 name = "wasip2" 3575 - version = "1.0.2+wasi-0.2.9" 3379 + version = "1.0.3+wasi-0.2.9" 3576 3380 source = "registry+https://github.com/rust-lang/crates.io-index" 3577 - checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" 3381 + checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" 3578 3382 dependencies = [ 3579 - "wit-bindgen", 3383 + "wit-bindgen 0.57.1", 3580 3384 ] 3581 3385 3582 3386 [[package]] ··· 3585 3389 source = "registry+https://github.com/rust-lang/crates.io-index" 3586 3390 checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" 3587 3391 dependencies = [ 3588 - "wit-bindgen", 3392 + "wit-bindgen 0.51.0", 3589 3393 ] 3590 3394 3591 3395 [[package]] 3592 3396 name = "wasm-bindgen" 3593 - version = "0.2.117" 3397 + version = "0.2.118" 3594 3398 source = "registry+https://github.com/rust-lang/crates.io-index" 3595 - checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" 3399 + checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" 3596 3400 dependencies = [ 3597 3401 "cfg-if", 3598 3402 "once_cell", ··· 3603 3407 3604 3408 [[package]] 3605 3409 name = "wasm-bindgen-futures" 3606 - version = "0.4.67" 3410 + version = "0.4.68" 3607 3411 source = "registry+https://github.com/rust-lang/crates.io-index" 3608 - checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e" 3412 + checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" 3609 3413 dependencies = [ 3610 3414 "js-sys", 3611 3415 "wasm-bindgen", ··· 3613 3417 3614 3418 [[package]] 3615 3419 name = "wasm-bindgen-macro" 3616 - version = "0.2.117" 3420 + version = "0.2.118" 3617 3421 source = "registry+https://github.com/rust-lang/crates.io-index" 3618 - checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" 3422 + checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" 3619 3423 dependencies = [ 3620 3424 "quote", 3621 3425 "wasm-bindgen-macro-support", ··· 3623 3427 3624 3428 [[package]] 3625 3429 name = "wasm-bindgen-macro-support" 3626 - version = "0.2.117" 3430 + version = "0.2.118" 3627 3431 source = "registry+https://github.com/rust-lang/crates.io-index" 3628 - checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" 3432 + checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" 3629 3433 dependencies = [ 3630 3434 "bumpalo", 3631 3435 "proc-macro2", ··· 3636 3440 3637 3441 [[package]] 3638 3442 name = "wasm-bindgen-shared" 3639 - version = "0.2.117" 3443 + version = "0.2.118" 3640 3444 source = "registry+https://github.com/rust-lang/crates.io-index" 3641 - checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" 3445 + checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" 3642 3446 dependencies = [ 3643 3447 "unicode-ident", 3644 3448 ] ··· 3671 3475 source = "registry+https://github.com/rust-lang/crates.io-index" 3672 3476 checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" 3673 3477 dependencies = [ 3674 - "bitflags 2.11.0", 3478 + "bitflags 2.11.1", 3675 3479 "hashbrown 0.15.5", 3676 3480 "indexmap", 3677 3481 "semver", ··· 3679 3483 3680 3484 [[package]] 3681 3485 name = "web-sys" 3682 - version = "0.3.94" 3486 + version = "0.3.95" 3683 3487 source = "registry+https://github.com/rust-lang/crates.io-index" 3684 - checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a" 3488 + checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" 3685 3489 dependencies = [ 3686 3490 "js-sys", 3687 3491 "wasm-bindgen", ··· 3715 3519 dependencies = [ 3716 3520 "getrandom 0.3.4", 3717 3521 "mac_address", 3718 - "sha2 0.10.9", 3522 + "sha2", 3719 3523 "thiserror 1.0.69", 3720 3524 "uuid", 3721 3525 ] ··· 3775 3579 source = "registry+https://github.com/rust-lang/crates.io-index" 3776 3580 checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" 3777 3581 dependencies = [ 3778 - "bitflags 2.11.0", 3582 + "bitflags 2.11.1", 3779 3583 "bytemuck", 3780 3584 "js-sys", 3781 3585 "log", ··· 3785 3589 ] 3786 3590 3787 3591 [[package]] 3592 + name = "wharrgarbl" 3593 + version = "0.1.0" 3594 + source = "git+https://tangled.org/sachy.dev/wharrgarbl#f10abbd1e303519f7d154cbe6f8074512495d5f2" 3595 + dependencies = [ 3596 + "aead", 3597 + "ctutils", 3598 + "hybrid-array", 3599 + "ml-kem", 3600 + "rand_core 0.10.1", 3601 + "wharrgarbl-strobe", 3602 + "wharrgarbl-utils", 3603 + "zeroize", 3604 + ] 3605 + 3606 + [[package]] 3607 + name = "wharrgarbl-strobe" 3608 + version = "0.1.0" 3609 + source = "git+https://tangled.org/sachy.dev/wharrgarbl#f10abbd1e303519f7d154cbe6f8074512495d5f2" 3610 + dependencies = [ 3611 + "aead", 3612 + "ctutils", 3613 + "hybrid-array", 3614 + "keccak", 3615 + "wharrgarbl-utils", 3616 + "zeroize", 3617 + ] 3618 + 3619 + [[package]] 3620 + name = "wharrgarbl-utils" 3621 + version = "0.1.0" 3622 + source = "git+https://tangled.org/sachy.dev/wharrgarbl#f10abbd1e303519f7d154cbe6f8074512495d5f2" 3623 + dependencies = [ 3624 + "aead", 3625 + ] 3626 + 3627 + [[package]] 3788 3628 name = "winapi" 3789 3629 version = "0.3.9" 3790 3630 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3858 3698 ] 3859 3699 3860 3700 [[package]] 3701 + name = "wit-bindgen" 3702 + version = "0.57.1" 3703 + source = "registry+https://github.com/rust-lang/crates.io-index" 3704 + checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" 3705 + 3706 + [[package]] 3861 3707 name = "wit-bindgen-core" 3862 3708 version = "0.51.0" 3863 3709 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3906 3752 checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" 3907 3753 dependencies = [ 3908 3754 "anyhow", 3909 - "bitflags 2.11.0", 3755 + "bitflags 2.11.1", 3910 3756 "indexmap", 3911 3757 "log", 3912 3758 "serde",
+1 -5
Cargo.toml
··· 47 47 serde.workspace = true 48 48 postcard.workspace = true 49 49 jiff = "0.2.18" 50 - sachy-crypto = { git = "https://tangled.org/sachy.dev/sachy-embed-core" } 51 - dhkem = { version = "0.1.0-rc.0", features = ["ecdh", "k256"] } 52 - 53 - [patch.crates-io] 54 - dhkem = { git = "https://github.com/RustCrypto/KEMs", rev = "2d277162e0c5ed1c53bb315d0c0dace394cba70a" } 50 + getrandom = { version = "0.4", features = ["sys_rng"]} 55 51 56 52 [build-dependencies] 57 53 sachy-config = { git = "https://tangled.org/sachy.dev/sachy-embed-core", package = "sachy-config" }
+9 -12
src/net.rs
··· 15 15 }; 16 16 17 17 use futures_concurrency::future::Race; 18 + use getrandom::{SysRng, rand_core::UnwrapErr}; 18 19 use striker_proto::{Client, ClientBuilder}; 19 20 20 21 use crate::constants::NOISE_PSK; ··· 129 130 } 130 131 131 132 async fn transport_handshake(mut tcp: &Async<TcpStream>) -> color_eyre::Result<Client> { 132 - let (encap, handshake) = ClientBuilder::start(); 133 + let mut client = ClientBuilder::new(&NOISE_PSK); 133 134 134 - let msg = encap.serialize(); 135 - let msg = msg.as_bytes(); 136 - let msg_len = u16::try_from(msg.len()).unwrap().to_be_bytes(); 135 + let mut buffer = Vec::with_capacity(2048); 137 136 138 - tcp.write_all(&msg_len).await?; 139 - tcp.write_all(msg).await?; 137 + client.start(&mut UnwrapErr(SysRng), &mut buffer)?; 140 138 141 - let mut payload = vec![0u8; 1024]; 142 - let mut msg_len = [0u8; 2]; 139 + tcp.write_all(buffer.as_ref()).await?; 143 140 144 - tcp.read_exact(&mut msg_len).await?; 141 + buffer.resize_with(2048, Default::default); 145 142 146 - let msg_len = usize::from(u16::from_be_bytes(msg_len)); 143 + let read = tcp.read(&mut buffer).await?; 147 144 148 - tcp.read_exact(&mut payload[..msg_len]).await?; 145 + buffer.truncate(read); 149 146 150 - let transport = handshake.finish(&payload[..msg_len], &NOISE_PSK)?; 147 + let transport = client.finish(buffer.as_ref())?; 151 148 152 149 Ok(transport) 153 150 }
+3 -3
striker-proto/Cargo.toml
··· 9 9 [dependencies] 10 10 serde = { workspace = true, features = ["alloc"] } 11 11 postcard = { workspace = true, features = ["alloc"] } 12 - sachy-crypto = { git = "https://tangled.org/sachy.dev/sachy-embed-core", features = ["alloc"] } 13 - aead = "=0.6.0-rc.10" 14 - dhkem = { version = "0.1.0-rc.0", features = ["ecdh", "k256"] } 12 + wharrgarbl = { git = "https://tangled.org/sachy.dev/wharrgarbl" } 13 + aead = { version = "=0.6.0-rc.10", features = ["alloc"] } 14 + rand_core = "0.10"
+46 -37
striker-proto/src/lib.rs
··· 2 2 3 3 use aead::Buffer; 4 4 use alloc::{string::String, vec::Vec}; 5 - use dhkem::{Secp256k1Kem, kem::Ciphertext}; 6 - use sachy_crypto::{ 7 - ClientHandshake, EncapsulatedPublicKey, ProtoError, ReceivingState, SendingState, 8 - ServerHandshake, TransportState, 5 + use rand_core::CryptoRng; 6 + use wharrgarbl::{ 7 + ClientHandshake128, Sec128, ServerHandshake128, 8 + handshake::{ClientHandshake, ServerHandshake}, 9 + transport::{AeadState, RecvState, SendState}, 9 10 }; 10 11 11 12 extern crate alloc; ··· 61 62 } 62 63 63 64 pub struct ClientBuilder { 64 - handshake: ClientHandshake, 65 + handshake: ClientHandshake128, 65 66 } 66 67 67 68 impl ClientBuilder { 68 - pub fn start() -> (EncapsulatedPublicKey, Self) { 69 - let (encap, handshake) = ClientHandshake::send(); 69 + pub fn new(psk: &[u8; 32]) -> Self { 70 + Self { 71 + handshake: ClientHandshake::new(Some(psk)), 72 + } 73 + } 74 + 75 + pub fn start( 76 + &mut self, 77 + rng: &mut impl CryptoRng, 78 + buffer: &mut dyn Buffer, 79 + ) -> Result<(), aead::Error> { 80 + self.handshake.send(rng, buffer)?; 70 81 71 - (encap, Self { handshake }) 82 + Ok(()) 72 83 } 73 84 74 - pub fn finish(self, ciphertext: &[u8], psk: &[u8; 32]) -> Result<Client, ProtoError> { 75 - self.handshake.finish(ciphertext, psk).map(Client) 85 + pub fn finish(mut self, ciphertext: &[u8]) -> aead::Result<Client> { 86 + self.handshake.receive(ciphertext).map(Client) 76 87 } 77 88 } 78 89 79 90 pub struct ServerBuilder { 80 - handshake: ServerHandshake, 91 + handshake: ServerHandshake128, 81 92 } 82 93 83 94 impl ServerBuilder { 84 - pub fn start(encap: &[u8]) -> Result<(Ciphertext<Secp256k1Kem>, Self), ProtoError> { 85 - let (ciphertext, handshake) = ServerHandshake::receive(encap)?; 86 - 87 - Ok((ciphertext, Self { handshake })) 95 + pub fn new(psk: &[u8; 32]) -> Self { 96 + Self { 97 + handshake: ServerHandshake::new(Some(psk)), 98 + } 88 99 } 89 100 90 - pub fn finish(self, psk: &[u8; 32]) -> Result<Server, ProtoError> { 91 - self.handshake.finish(psk).map(Server) 101 + pub fn receive( 102 + &mut self, 103 + rng: &mut impl CryptoRng, 104 + encap: &mut dyn Buffer, 105 + ) -> aead::Result<Server> { 106 + self.handshake.respond(rng, encap).map(Server) 92 107 } 93 108 } 94 109 95 - pub struct Client(TransportState); 110 + pub struct Client(AeadState<Sec128>); 96 111 97 112 impl Client { 98 113 pub fn split(&self) -> (ClientSender<'_>, ClientReceiver<'_>) { ··· 102 117 } 103 118 } 104 119 105 - pub struct ClientSender<'a>(SendingState<'a>); 120 + pub struct ClientSender<'a>(SendState<'a, Sec128>); 106 121 107 122 impl ClientSender<'_> { 108 123 pub fn encode_request( 109 124 &mut self, 110 125 request: StrikerRequest, 111 126 msg: &mut dyn Buffer, 112 - ) -> Result<(), ProtoError> { 127 + ) -> aead::Result<()> { 113 128 let written = postcard::to_slice(&request, msg.as_mut()) 114 - .map_err(|_| ProtoError)? 129 + .map_err(|_| aead::Error)? 115 130 .len(); 116 131 117 132 msg.truncate(written); ··· 120 135 } 121 136 } 122 137 123 - pub struct ClientReceiver<'a>(ReceivingState<'a>); 138 + pub struct ClientReceiver<'a>(RecvState<'a, Sec128>); 124 139 125 140 impl ClientReceiver<'_> { 126 - pub fn decode_response( 127 - &mut self, 128 - msg: &mut dyn Buffer, 129 - ) -> Result<StrikerResponse, ProtoError> { 141 + pub fn decode_response(&mut self, msg: &mut dyn Buffer) -> aead::Result<StrikerResponse> { 130 142 self.0.decrypt(msg, PROTO_ASSOCIATED_DATA)?; 131 143 132 - postcard::from_bytes(msg.as_mut()).map_err(|_| ProtoError) 144 + postcard::from_bytes(msg.as_mut()).map_err(|_| aead::Error) 133 145 } 134 146 } 135 147 136 - pub struct Server(TransportState); 148 + pub struct Server(AeadState<Sec128>); 137 149 138 150 impl Server { 139 151 pub fn split(&self) -> (ServerSender<'_>, ServerReceiver<'_>) { ··· 143 155 } 144 156 } 145 157 146 - pub struct ServerSender<'a>(SendingState<'a>); 158 + pub struct ServerSender<'a>(SendState<'a, Sec128>); 147 159 148 160 impl ServerSender<'_> { 149 161 pub fn encode_response( 150 162 &mut self, 151 163 response: StrikerResponse, 152 164 msg: &mut dyn Buffer, 153 - ) -> Result<(), ProtoError> { 165 + ) -> aead::Result<()> { 154 166 let written = postcard::to_slice(&response, msg.as_mut()) 155 - .map_err(|_| ProtoError)? 167 + .map_err(|_| aead::Error)? 156 168 .len(); 157 169 158 170 msg.truncate(written); ··· 161 173 } 162 174 } 163 175 164 - pub struct ServerReceiver<'a>(ReceivingState<'a>); 176 + pub struct ServerReceiver<'a>(RecvState<'a, Sec128>); 165 177 166 178 impl ServerReceiver<'_> { 167 - pub fn decode_request( 168 - &mut self, 169 - msg: &mut dyn Buffer, 170 - ) -> Result<StrikerRequest, ProtoError> { 179 + pub fn decode_request(&mut self, msg: &mut dyn Buffer) -> aead::Result<StrikerRequest> { 171 180 self.0.decrypt(msg, PROTO_ASSOCIATED_DATA)?; 172 181 173 - postcard::from_bytes(msg.as_mut()).map_err(|_| ProtoError) 182 + postcard::from_bytes(msg.as_mut()).map_err(|_| aead::Error) 174 183 } 175 184 }