[ ] I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request
Motivation:
When PublicKey's are used in struct's that are marked Equatable those structs cannot be auto-synthetized conform to Equatable since these PublicKeys before this PR do not conform to Equatable. This is rather annoying. And during the 5 years I've been working in the crypto industry I have added my own conformance to CryptoKit's PublicKeys to be Equatable probably more than 10 times!
There exists no security risk in making PublicKeys conform to Equatable, the current implementation does not use safeCompare, it could, but I deem it not necessary.
There is really no drawback in adding Equatable conformance.
Modifications:
Make Curve25519.Signing.PublicKey be Equatable
Make Curve25519.KeyAgreement.PublicKey be Equatable
Add tests for these.
Result:
Curve25519.Signing.PublicKey and Curve25519.KeyAgreement.PublicKey now conform to Equatable.
Make Curve25519 PublicKeys conform to
Equatable
Checklist
If you've made changes to
gyb
files.script/generate_boilerplate_files_with_gyb
and included updated generated files in a commit of this pull requestMotivation:
When PublicKey's are used in
struct
's that are markedEquatable
those structs cannot be auto-synthetized conform toEquatable
since these PublicKeys before this PR do not conform toEquatable
. This is rather annoying. And during the 5 years I've been working in the crypto industry I have added my own conformance to CryptoKit's PublicKeys to beEquatable
probably more than 10 times!There exists no security risk in making PublicKeys conform to
Equatable
, the current implementation does not usesafeCompare
, it could, but I deem it not necessary.There is really no drawback in adding
Equatable
conformance.Modifications:
Curve25519.Signing.PublicKey
beEquatable
Curve25519.KeyAgreement.PublicKey
beEquatable
Result:
Curve25519.Signing.PublicKey
andCurve25519.KeyAgreement.PublicKey
now conform toEquatable
.