426 Commits

Author SHA1 Message Date
eyedeekay
ef4d4658c0 NTCP2: Add CreateSessionRequest to implement handshake 1 message, modify ComposeInitiatorHandshakeMessage to actually send it 2024-12-01 15:27:42 -05:00
Haris Khan
15bf28403e exported KeyCertificate 2024-12-01 01:28:38 -05:00
Haris Khan
b40c0ab6f9 fixed crypto public key size 2024-12-01 01:13:53 -05:00
Haris Khan
55245b2aa7 added more logging 2024-11-26 23:06:21 -05:00
Haris Khan
208051f92d strange error: publicKey has invalid size: expected 0, got 256 2024-11-26 23:03:17 -05:00
Haris Khan
8a672ca6ca adjust var names 2024-11-26 22:10:53 -05:00
Haris Khan
45def9dd0c Merge branch 'master' into tests 2024-11-26 22:08:46 -05:00
Haris Khan
a58f64566f Destination size 363 -> Fail 2024-11-26 21:28:02 -05:00
Haris Khan
891d915bb2 TODO 2024-11-26 20:30:37 -05:00
Haris Khan
a0a8704c6c mapping.size = size to fix dereference panic 2024-11-26 20:30:31 -05:00
Haris Khan
c68acf848e Corrected ValuesToMapping to order correctly 2024-11-26 19:56:32 -05:00
Haris Khan
7a6927cf53 gofumpt 2024-11-26 19:47:17 -05:00
Haris Khan
37e11ffee1 adjust generateTestRouterInfo 2024-11-26 15:56:41 -05:00
Haris Khan
e15e427f60 return error + uniform naming 2024-11-26 15:56:29 -05:00
Haris Khan
f0803a095e tweaks 2024-11-26 15:55:50 -05:00
Haris Khan
bf7e88bec1 updated test functions to not panic 2024-11-24 14:34:14 -05:00
Haris Khan
065ceeb88f Various changes
-removed outdated test functions (to be replaced later)
-added working experimental ReadKeysAndCert replacement candidate ReadKeysAndCertDeux
-added readCertificateFromEnd
-added constructPublicKey
-exported SpkType and CpkType in KeyCertificate
-added CryptoPublicKeySize() method
-added SigningPublicKeySize() method
2024-11-24 14:25:40 -05:00
Haris Khan
ca4a7a13ea experimental functions, tests pass 2024-11-23 23:54:01 -05:00
Haris Khan
0b0753cac1 tweaks 2024-11-23 22:48:58 -05:00
Haris Khan
40c2c4806c fix padding + fail on invalid padding instead of warn. 2024-11-23 22:45:32 -05:00
eyedeekay
9e3c8bcb98 move logger out of go-i2p so we can re-use it without importing the entire module 2024-11-21 17:16:48 -05:00
Haris Khan
9b4bf2663d clear artifact 2024-11-21 14:25:39 -05:00
eyedeekay
4a6f49d14a NTCP: fix IV functions 2024-11-20 16:02:14 -05:00
eyedeekay
5d789973b2 DRY: use obfs library to ofuscate and deobfuscate ephemeral keys 2024-11-20 15:55:07 -05:00
eyedeekay
08127861f1 Refactor: Fix constants. 2024-11-20 15:37:44 -05:00
eyedeekay
0e6ffd856b Refactor: move Compose* onto the NoiseSession struct. Fix constants. 2024-11-20 15:34:48 -05:00
satk0
eeb1e215a5 Add lease tests and make names more clear 2024-11-19 17:31:34 +01:00
Haris Khan
08e599e59a create Ed25519PublicKeyFromBytes 2024-11-18 12:34:03 -05:00
Haris Khan
30f5565217 .Type -> .Type() 2024-11-18 12:27:55 -05:00
Haris Khan
fc3ba17af5 ReadKeysAndCert is not working as expected 2024-11-18 12:25:31 -05:00
Haris Khan
631f8d1850 nuked lease_set_test.go -> BROKEN 2024-11-17 23:04:07 -05:00
Haris Khan
cc43160bb9 nuked & revived router_info_test.go
-TestRouterInfoCapabilities() fails
-TestRouterInfoVersion() fails
2024-11-17 22:23:31 -05:00
Haris Khan
09acf3d23d adjusted router_info2_test.go 2024-11-17 22:04:27 -05:00
Haris Khan
cbe4af8459 added AsDestination() 2024-11-17 21:44:32 -05:00
Haris Khan
b72ed0a37d remove recovery attempt in mapping 2024-11-17 21:39:31 -05:00
Haris Khan
07268df720 CRITICAL: Reverted mapping.go 2024-11-17 21:03:42 -05:00
Haris Khan
def8789b77 verification 2024-11-17 14:13:38 -05:00
Haris Khan
59c53bc5c1 Added constructors and readers
-NewLeaseSet()
-NewLeaseSetFromBytes()
-ReadLease()
-NewLeaseFromBytes()
2024-11-17 14:00:41 -05:00
Haris Khan
ee56e0f40f corrected TestPublicKeyWithBadCertificate that had fault error matching 2024-11-17 13:32:08 -05:00
Haris Khan
64d90a157c Fixed array bounds error in handling short input in NewKeyCertificate 2024-11-17 12:55:34 -05:00
Haris Khan
3acff32f17 adjusted vars, all tests pass for mapping 2024-11-17 12:36:26 -05:00
Haris Khan
362513bbe5 Handle extra bytes beyond mapping length 2024-11-17 12:32:46 -05:00
Haris Khan
c9f3227116 added length check to ReadMapping 2024-11-17 12:23:21 -05:00
Haris Khan
f0702ffba9 Various changes
-we're dropping errors instead of trying to recover
-revamp TestReadI2PStringErrWhenDataTooShort to reflect drops instead of recoveries
2024-11-17 11:52:47 -05:00
Haris Khan
11b9018630 implement uniform errors 2024-11-17 11:26:02 -05:00
Haris Khan
f6daa5d9b6 Various changes
-in func (str I2PString) Data(): remove recovery attempts causing tests to fail
-added more universal errors
2024-11-17 11:16:43 -05:00
Haris Khan
58d1f0d815 fixed func (str I2PString) Data()
-replace actual length expected by TestI2PStringDataReportsExtraDataError, which is an invalid length
-added note to see if we should trim instead
2024-11-17 10:52:47 -05:00
Haris Khan
62ececf102 fixed func(str I2pString) Length()
-Previously incorrectly checked length causing TestI2PStringReportsExtraDataError to fail
2024-11-17 10:35:22 -05:00
idk
f729bda62d Merge branch 'master' into routerinfo 2024-11-16 18:17:10 +00:00
eyedeekay
4ad0f97bfe Fail-fast switch for logging Logging, format 2024-11-16 13:15:33 -05:00