Documentation ¶
Index ¶
- Variables
- func HardwareRecoverCallback()
- func PostRecoverPubkey(boe *BoeHandle)
- type BoeHandle
- func (boe *BoeHandle) ASyncValidateSign(txhash []byte, hash []byte, r []byte, s []byte, v byte) error
- func (boe *BoeHandle) FWUpdate() error
- func (boe *BoeHandle) FWUpdateAbort() error
- func (boe *BoeHandle) FWUpdateWithFile(fpath string) error
- func (boe *BoeHandle) GetBindAccount() (string, error)
- func (boe *BoeHandle) GetBoeId() (string, error)
- func (boe *BoeHandle) GetNextHash(hash []byte) ([]byte, error)
- func (boe *BoeHandle) GetNextHash_v2(hash []byte) ([]byte, error)
- func (boe *BoeHandle) GetRandom() ([]byte, error)
- func (boe *BoeHandle) GetVersion() (TVersion, error)
- func (boe *BoeHandle) HWCheck() bool
- func (boe *BoeHandle) HW_Auth_Sign(random []byte) ([]byte, error)
- func (boe *BoeHandle) HW_Auth_Sign_With_Hid(random []byte) ([]byte, error)
- func (boe *BoeHandle) HW_Auth_Verify(random []byte, cid []byte, signature []byte) bool
- func (boe *BoeHandle) HW_Auth_Verify_With_Hid(random []byte, hid []byte, cid []byte, signature []byte) bool
- func (boe *BoeHandle) HashVerify(old []byte, next []byte) error
- func (boe *BoeHandle) Init() error
- func (boe *BoeHandle) RegisterRecoverPubCallback(call BoeRecoverPubKeyFunc)
- func (boe *BoeHandle) Release() error
- func (boe *BoeHandle) Sleep()
- func (boe *BoeHandle) ValidateSign(hash []byte, r []byte, s []byte, v byte) ([]byte, error)
- type BoeRecoverPubKeyFunc
- type RecoverPubkey
- type Release
- type TVersion
- type TaskTh
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidParams = errors.New("invalid params") ErrInitFailed = errors.New("init failed") ErrReleaseFailed = errors.New("release failed") ErrSignCheckFailed = errors.New("recover pubkey failed") ErrHWSignFailed = errors.New("hw sign failed") ErrUnknownEvent = errors.New("unknown event") ErrIDNotMatch = errors.New("id not match") ErrUpdateFailed = errors.New("update failed") ErrUpdateAbortFailed = errors.New("update abort failed") ErrGetAccountFailed = errors.New("get bind account failed") ErrSetAccountFailed = errors.New("set bind account failed") ErrGetNextHashFailed = errors.New("get next hash failed") ErrGetSNFailed = errors.New("get sn failed") ErrNoNeedUpdate = errors.New("no need update") ErrHashVerifyFailed = errors.New("verify hash failed") ErrHashTimeLimited = errors.New("get hash time limited") )
Functions ¶
func HardwareRecoverCallback ¶
func HardwareRecoverCallback()
func PostRecoverPubkey ¶
func PostRecoverPubkey(boe *BoeHandle)
PostRecoverPubkey get result from hardware ecc-recover, and post the result to external module.
Types ¶
type BoeHandle ¶
type BoeHandle struct {
// contains filtered or unexported fields
}
func BoeGetInstance ¶
func BoeGetInstance() *BoeHandle
func (*BoeHandle) ASyncValidateSign ¶
func (*BoeHandle) FWUpdateAbort ¶
func (*BoeHandle) FWUpdateWithFile ¶
update boe firmware with exist file
func (*BoeHandle) GetBindAccount ¶
func (*BoeHandle) GetNextHash_v2 ¶
* New Hash algorithm, supported by boe firmware v1.0.0.2
func (*BoeHandle) GetVersion ¶
get boe firmware version
func (*BoeHandle) HW_Auth_Sign ¶
sign the data with specific private every boe board.
func (*BoeHandle) HW_Auth_Sign_With_Hid ¶
sign the data with specific private every boe board.
func (*BoeHandle) HW_Auth_Verify ¶
verify if signature is signed with current boe board.
func (*BoeHandle) HW_Auth_Verify_With_Hid ¶
func (boe *BoeHandle) HW_Auth_Verify_With_Hid(random []byte, hid []byte, cid []byte, signature []byte) bool
verify if signature is signed with current boe board.
func (*BoeHandle) RegisterRecoverPubCallback ¶
func (boe *BoeHandle) RegisterRecoverPubCallback(call BoeRecoverPubKeyFunc)
type BoeRecoverPubKeyFunc ¶
type BoeRecoverPubKeyFunc func(RecoverPubkey, error)
type RecoverPubkey ¶
type RecoverPubkey struct { TxHash []byte // recover tx's hash Hash []byte Sig []byte // signature Pub []byte // recovered pubkey }
result for recover pubkey
Click to show internal directories.
Click to hide internal directories.