Documentation
¶
Index ¶
- Variables
- type ConfigPublicKey
- type EncryptedOCRKeyExport
- type KeyV2
- func (key KeyV2) ConfigDiffieHellman(base *[curve25519.PointSize]byte) (sharedPoint *[curve25519.PointSize]byte, err error)
- func (key KeyV2) GetID() string
- func (key KeyV2) GoString() string
- func (key KeyV2) ID() string
- func (key KeyV2) PublicKeyConfig() [curve25519.PointSize]byte
- func (key KeyV2) PublicKeyOffChain() ocrtypes.OffchainPublicKey
- func (key KeyV2) Raw() Raw
- func (key KeyV2) SignOffChain(msg []byte) (signature []byte, err error)
- func (key KeyV2) String() string
- func (key KeyV2) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)
- type OCR2KeyWrapper
- func (o OCR2KeyWrapper) ConfigDiffieHellman(point [curve25519.PointSize]byte) (sharedPoint [curve25519.PointSize]byte, err error)
- func (o OCR2KeyWrapper) ConfigEncryptionPublicKey() types.ConfigEncryptionPublicKey
- func (o OCR2KeyWrapper) OffchainPublicKey() types.OffchainPublicKey
- func (o OCR2KeyWrapper) OffchainSign(msg []byte) (signature []byte, err error)
- type OffChainPublicKey
- type Raw
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrScalarTooBig = errors.Errorf("can't handle scalars greater than %d", curve25519.PointSize)
)
Functions ¶
This section is empty.
Types ¶
type ConfigPublicKey ¶
type ConfigPublicKey [curve25519.PointSize]byte
ConfigPublicKey represents the public key for the config decryption keypair
func (ConfigPublicKey) MarshalJSON ¶
func (cpk ConfigPublicKey) MarshalJSON() ([]byte, error)
func (ConfigPublicKey) Raw ¶
func (cpk ConfigPublicKey) Raw() string
func (ConfigPublicKey) String ¶
func (cpk ConfigPublicKey) String() string
func (*ConfigPublicKey) UnmarshalJSON ¶
func (cpk *ConfigPublicKey) UnmarshalJSON(input []byte) error
func (*ConfigPublicKey) UnmarshalText ¶
func (cpk *ConfigPublicKey) UnmarshalText(bs []byte) error
type EncryptedOCRKeyExport ¶
type EncryptedOCRKeyExport struct { KeyType string `json:"keyType"` ID string `json:"id"` OffChainPublicKey OffChainPublicKey `json:"offChainPublicKey"` ConfigPublicKey ConfigPublicKey `json:"configPublicKey"` Crypto *keystore.CryptoJSON `json:"crypto,omitempty"` }
type KeyV2 ¶
type KeyV2 struct { OffChainSigning *offChainPrivateKey OffChainEncryption *[curve25519.ScalarSize]byte }
func MustNewV2XXXTestingOnly ¶
func (KeyV2) ConfigDiffieHellman ¶
func (key KeyV2) ConfigDiffieHellman(base *[curve25519.PointSize]byte) ( sharedPoint *[curve25519.PointSize]byte, err error, )
ConfigDiffieHellman returns the shared point obtained by multiplying someone's public key by a secret scalar ( in this case, the OffChainEncryption key.)
func (KeyV2) PublicKeyConfig ¶
func (key KeyV2) PublicKeyConfig() [curve25519.PointSize]byte
PublicKeyConfig returns the public component of the keypair used in ConfigKeyShare
func (KeyV2) PublicKeyOffChain ¶
func (key KeyV2) PublicKeyOffChain() ocrtypes.OffchainPublicKey
PublicKeyOffChain returns the pbulic component of the keypair used in SignOffChain
func (KeyV2) SignOffChain ¶
SignOffChain returns an EdDSA-Ed25519 signature on msg.
func (KeyV2) ToEncryptedJSON ¶
type OCR2KeyWrapper ¶
type OCR2KeyWrapper struct {
// contains filtered or unexported fields
}
func NewOCR2KeyWrapper ¶
func NewOCR2KeyWrapper(key KeyV2) OCR2KeyWrapper
func (OCR2KeyWrapper) ConfigDiffieHellman ¶
func (o OCR2KeyWrapper) ConfigDiffieHellman(point [curve25519.PointSize]byte) (sharedPoint [curve25519.PointSize]byte, err error)
func (OCR2KeyWrapper) ConfigEncryptionPublicKey ¶
func (o OCR2KeyWrapper) ConfigEncryptionPublicKey() types.ConfigEncryptionPublicKey
func (OCR2KeyWrapper) OffchainPublicKey ¶
func (o OCR2KeyWrapper) OffchainPublicKey() types.OffchainPublicKey
func (OCR2KeyWrapper) OffchainSign ¶
func (o OCR2KeyWrapper) OffchainSign(msg []byte) (signature []byte, err error)
type OffChainPublicKey ¶
func (OffChainPublicKey) MarshalJSON ¶
func (ocpk OffChainPublicKey) MarshalJSON() ([]byte, error)
func (OffChainPublicKey) Raw ¶
func (ocpk OffChainPublicKey) Raw() string
func (OffChainPublicKey) String ¶
func (ocpk OffChainPublicKey) String() string
func (*OffChainPublicKey) UnmarshalJSON ¶
func (ocpk *OffChainPublicKey) UnmarshalJSON(input []byte) error
func (*OffChainPublicKey) UnmarshalText ¶
func (ocpk *OffChainPublicKey) UnmarshalText(bs []byte) error
Click to show internal directories.
Click to hide internal directories.