mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
- Update copyright headers to 2025 - Standardize Go version to 1.25.1 - Remove toolchain directive
24 lines
568 B
Go
24 lines
568 B
Go
// Copyright (C) 2019-2025, 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
|
|
}
|