mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
corona → corona — final sweep (live source clean)
This commit is contained in:
@@ -121,15 +121,15 @@ type ThresholdEngine interface {
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
// Validator creates their share
|
// Validator creates their share
|
||||||
precomp, _ := corona.Precompute(validatorSK)
|
precomp, _ := Corona.Precompute(validatorSK)
|
||||||
share, _ := corona.QuickSign(precomp, blockHash)
|
share, _ := Corona.QuickSign(precomp, blockHash)
|
||||||
|
|
||||||
// Collect shares from t validators
|
// Collect shares from t validators
|
||||||
shares := collectSharesFromValidators()
|
shares := collectSharesFromValidators()
|
||||||
|
|
||||||
// Aggregate into final certificate
|
// Aggregate into final certificate
|
||||||
if len(shares) >= threshold {
|
if len(shares) >= threshold {
|
||||||
cert, _ := corona.Aggregate(shares)
|
cert, _ := Corona.Aggregate(shares)
|
||||||
// cert is the threshold signature
|
// cert is the threshold signature
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ Pulsar threshold operations depend on the consensus layer.
|
|||||||
func exportPublicKeys(s *signer.Signer) map[string][]byte {
|
func exportPublicKeys(s *signer.Signer) map[string][]byte {
|
||||||
return map[string][]byte{
|
return map[string][]byte{
|
||||||
"bls": s.GetBLSPublicKey(),
|
"bls": s.GetBLSPublicKey(),
|
||||||
"corona": s.GetCoronaPublicKey().Bytes(),
|
"Corona": s.GetCoronaPublicKey().Bytes(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -140,7 +140,7 @@ func exportPublicKeys(s *signer.Signer) map[string][]byte {
|
|||||||
```go
|
```go
|
||||||
// For advanced operations
|
// For advanced operations
|
||||||
blsKey := s.BLSSecretKey()
|
blsKey := s.BLSSecretKey()
|
||||||
coronaKey := s.CoronaPrivateKey()
|
CoronaKey := s.CoronaPrivateKey()
|
||||||
```
|
```
|
||||||
|
|
||||||
## Security Considerations
|
## Security Considerations
|
||||||
|
|||||||
Reference in New Issue
Block a user