Documentation ¶
Index ¶
- Constants
- Variables
- func Rand(n int) []byte
- type Keyring
- func (k *Keyring) ClearSessionKeys()
- func (k *Keyring) DecryptOFB(ciphertext []byte) (plaintext []byte, err error)
- func (k *Keyring) EncryptOFB(plaintext []byte) (ciphertext []byte, err error)
- func (k *Keyring) Export(index int, private bool) ([]byte, error)
- func (k *Keyring) Import(index int, private bool, der []byte) (err error)
- func (k *Keyring) Init(overwrite bool) (err error)
- func (k *Keyring) Load() (err error)
- func (k *Keyring) NewLongtermKey() (err error)
- func (k *Keyring) NewSessionKeys(nonce []byte) (err error)
- func (k *Keyring) Save() (err error)
- func (k *Keyring) SetCipher(kind api.Cipher, diversifier []byte) (err error)
- func (k *Keyring) SignECDSA(data []byte, ephemeral bool) (sig *api.Signature, err error)
- func (k *Keyring) VerifyECDSA(data []byte, sig *api.Signature, ephemeral bool) (err error)
- type PersistentConfiguration
Constants ¶
View Source
const ( // flag to select DCP for on supported block ciphers DCP = true // flag to allow DCP, when flagged, for XTS computation DCPXTS = false // flag to select DCP for ESSIV computation DCPIV = false // key derivation iteration count PBKDF2_ITER = 4096 // DEK key derivation diversifier DEK_DIV = "floppyDEK" // ESSIV key derivation diversifier ESSIV_DIV = "floppyESSIV" // SNVS key derivation diversifier SNVS_DIV = "floppySNVS" )
View Source
const ( MMC_CONF_BLOCK = 2097152 CONF_BLOCKS_V1 = 2 CONF_BLOCKS_V2 = 2048 )
View Source
const ( BLOCK_KEY = iota ESSIV_KEY SNVS_KEY )
DCP key RAM indices
View Source
const ( UA_LONGTERM_KEY = iota UA_EPHEMERAL_KEY MD_LONGTERM_KEY MD_EPHEMERAL_KEY )
BLE key indices
Variables ¶
View Source
var ESSIV = false
flag to select ESSIV on AES-128 CBC ciphers
Functions ¶
Types ¶
type Keyring ¶
type Keyring struct { // FDE function Cipher func(buf []byte, lba int, blocks int, blockSize int, enc bool, wg *sync.WaitGroup) // Configuration instance Conf *PersistentConfiguration // long term BLE peer authentication keys ArmoryLongterm *ecdsa.PrivateKey MobileLongterm *ecdsa.PublicKey // contains filtered or unexported fields }
func (*Keyring) ClearSessionKeys ¶
func (k *Keyring) ClearSessionKeys()
func (*Keyring) DecryptOFB ¶
func (*Keyring) EncryptOFB ¶
func (*Keyring) NewLongtermKey ¶
func (*Keyring) NewSessionKeys ¶
type PersistentConfiguration ¶
type PersistentConfiguration struct { // serialized long term BLE peer authentication keys ArmoryLongterm []byte MobileLongterm []byte // BLE API Configuration Settings *api.Configuration // Transparency Log Checkpoint ProofBundle *logapi.ProofBundle }
Click to show internal directories.
Click to hide internal directories.