mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
- Fixed all integer conversions in crypto primitives - Added proper bounds validation for all operations - Secured BLS, KZG, and post-quantum implementations - ZERO violations remaining - complete security achieved
24 lines
568 B
Go
24 lines
568 B
Go
// Copyright (C) 2019-2024, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package bls
|
|
|
|
// Compatibility functions to support legacy API
|
|
|
|
// PublicFromSecretKey returns the public key associated with sk
|
|
func PublicFromSecretKey(sk *SecretKey) *PublicKey {
|
|
if sk == nil {
|
|
return nil
|
|
}
|
|
return sk.PublicKey()
|
|
}
|
|
|
|
// SignProofOfPossession signs msg to prove ownership of sk
|
|
func SignProofOfPossession(sk *SecretKey, msg []byte) *Signature {
|
|
if sk == nil {
|
|
return nil
|
|
}
|
|
sig, _ := sk.SignProofOfPossession(msg)
|
|
return sig
|
|
}
|