Skip to content

Commit

Permalink
docs: comments about invariant for CBLSSecretKey for bls scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Dec 27, 2024
1 parent 5c36bb2 commit f76f943
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bls/bls.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class CBLSId : public CBLSWrapper<CBLSIdImplicit, BLS_CURVE_ID_SIZE, CBLSId>
explicit CBLSId(const uint256& nHash);
};

//! CBLSSecretKey is invariant to BLS scheme for Creation / Serialization / Deserialization
class CBLSSecretKey : public CBLSWrapper<bls::PrivateKey, BLS_CURVE_SECKEY_SIZE, CBLSSecretKey>
{
public:
Expand All @@ -270,10 +271,13 @@ class CBLSSecretKey : public CBLSWrapper<bls::PrivateKey, BLS_CURVE_SECKEY_SIZE,
static CBLSSecretKey AggregateInsecure(Span<CBLSSecretKey> sks);

#ifndef BUILD_BITCOIN_INTERNAL
//! MakeNewKey() is invariant to BLS scheme
void MakeNewKey();
#endif
//! SecretKeyShare() is invariant to BLS scheme
bool SecretKeyShare(Span<CBLSSecretKey> msk, const CBLSId& id);

//! GetPublicKey() is invariant to BLS scheme
[[nodiscard]] CBLSPublicKey GetPublicKey() const;
[[nodiscard]] CBLSSignature Sign(const uint256& hash, const bool specificLegacyScheme) const;
};
Expand Down

0 comments on commit f76f943

Please sign in to comment.