Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce separate types for different keys #72

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

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.
NOnion/Network/TorCircuit.fs Outdated Show resolved Hide resolved
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.

None yet

2 participants