Skip to content

Conversation

@webwarrior-ws
Copy link

Introduce separate types for different keys instead of using byte array everywhere.

Introduced types for public and private expanded blinded keys
that wrap byte array representation of those keys.
Use those types instead of raw byte arrays.
This should improve code clarity and potentially, safety.
Introduced NTorOnionKey type that wraps byte array and use it
where applicable.
Use Ed25519PublicKeyParameters instead of byte array for
IntroductionPointInfo.MasterPublicKey.
This should improve code clarity and potentially, safety.
Introduced IdentityKey type that wraps byte array and use it
where applicable.
This should improve code clarity and potentially, safety.
Renamed OnionKey to NTorOnionKey in IntroductionPointInfo.
Make NTorOnionKey type validate key length on creation.
Make IdentityKey type validate key length on creation.
Improve error message for wrong key length.
Renamed ExpandedBlindedPublicKey to BlindedPublicKey.
Renamed ExpandedBlindedPrivateKey to Ed25519PrivateKey,
which now can be either NormalEd25519PrivateKey or
ExpandedEd25519PrivateKey.
Implemented length checks for both.
Renamed BlindedPublicKey to ED25519PublicKey.
Use BouncyCastle types for Ed25519PrivateKey.NormalEd25519
and ED25519PublicKey.
Renamed IdentityKey type to Fingerprint as technically this is
the digest of identity key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants