Cripto - Piattaforma
Questo modulo include l'astrazione della piattaforma per la crittografia.
Riepilogo
| Enumerazioni | |
|---|---|
| anonymous enum{ | enum Definisce i flag di utilizzo delle chiavi.  | 
| otCryptoKeyAlgorithm{ | enum Definisce gli algoritmi chiave.  | 
| otCryptoKeyStorage{ | enum Definisce i tipi di archiviazione delle chiavi.  | 
| otCryptoKeyType{ | enum Definisce i tipi di chiavi.  | 
| Typedef | |
|---|---|
| otCryptoContext | typedef struct otCryptoContext | 
| otCryptoKey | typedef struct otCryptoKey | 
| otCryptoKeyRef | typedef uint32_tQuesto tipo di dati rappresenta il riferimento chiave.  | 
| otPlatCryptoEcdsaKeyPair | typedef struct otPlatCryptoEcdsaKeyPair | 
| otPlatCryptoEcdsaPublicKey | typedef struct otPlatCryptoEcdsaPublicKey | 
| otPlatCryptoEcdsaSignature | typedef struct otPlatCryptoEcdsaSignature | 
| otPlatCryptoSha256Hash | typedef struct otPlatCryptoSha256HashRappresenta un hash SHA-256.  | 
| Variabili | |
|---|---|
| OT_TOOL_PACKED_END | |
| Funzioni | |
|---|---|
| otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput, uint8_t *aOutput) | Criptare i dati forniti.  | 
| otPlatCryptoAesFree(otCryptoContext *aContext) | Libera il contesto AES.  | 
| otPlatCryptoAesInit(otCryptoContext *aContext) | Inizializzare l'operazione AES.  | 
| otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey) | Imposta la chiave per il funzionamento con AES.  | 
| otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef) | Elimina una chiave archiviata in PSA ITS.  | 
| otPlatCryptoEcdsaExportPublicKey(otCryptoKeyRef aKeyRef, otPlatCryptoEcdsaPublicKey *aPublicKey) | Recupera la chiave pubblica associata dal riferimento alla chiave passato.  | 
| otPlatCryptoEcdsaGenerateAndImportKey(otCryptoKeyRef aKeyRef) | Genera e importa una nuova coppia di chiavi ECDSA al riferimento passato.  | 
| otPlatCryptoEcdsaGenerateKey(otPlatCryptoEcdsaKeyPair *aKeyPair) | Genera e compila il buffer di output con una nuova coppia di chiavi ECDSA.  | 
| otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair, otPlatCryptoEcdsaPublicKey *aPublicKey) | Recupera la chiave pubblica associata dal contesto di input.  | 
| otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair, const otPlatCryptoSha256Hash *aHash, otPlatCryptoEcdsaSignature *aSignature) | Calcola la firma ECDSA per un messaggio con hash utilizzando la chiave privata dal contesto di input.  | 
| otPlatCryptoEcdsaSignUsingKeyRef(otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, otPlatCryptoEcdsaSignature *aSignature) | Calcola la firma ECDSA per un messaggio con hash utilizzando il riferimento alla chiave passato.  | 
| otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey, const otPlatCryptoSha256Hash *aHash, const otPlatCryptoEcdsaSignature *aSignature) | Utilizza la chiave del contesto di input per verificare la firma ECDSA di un messaggio con hash.  | 
| otPlatCryptoEcdsaVerifyUsingKeyRef(otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, const otPlatCryptoEcdsaSignature *aSignature) | Utilizza il riferimento chiave per verificare la firma ECDSA di un messaggio con hash.  | 
| otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen) | Esporta una chiave archiviata in PSA ITS.  | 
| otPlatCryptoHasKey(otCryptoKeyRef aKeyRef) | boolVerifica se al riferimento chiave passato è associata una chiave nell'ITS di PSA.  | 
| otPlatCryptoHkdfDeinit(otCryptoContext *aContext) | Annulla l'inizializzazione del contesto HKDF.  | 
| otPlatCryptoHkdfExpand(otCryptoContext *aContext, const uint8_t *aInfo, uint16_t aInfoLength, uint8_t *aOutputKey, uint16_t aOutputKeyLength) | Esegui il passaggio di espansione HKDF.  | 
| otPlatCryptoHkdfExtract(otCryptoContext *aContext, const uint8_t *aSalt, uint16_t aSaltLength, const otCryptoKey *aInputKey) | Esegui il passaggio di estrazione HKDF.  | 
| otPlatCryptoHkdfInit(otCryptoContext *aContext) | Inizializza il contesto HKDF.  | 
| otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext) | Annulla l'inizializzazione dell'operazione HMAC.  | 
| otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, size_t aBufLength) | Completa l'operazione HMAC.  | 
| otPlatCryptoHmacSha256Init(otCryptoContext *aContext) | Inizializzare l'operazione HMAC.  | 
| otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey *aKey) | Avvia operazione HMAC.  | 
| otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength) | Aggiorna l'operazione HMAC con un nuovo input.  | 
| otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef, otCryptoKeyType aKeyType, otCryptoKeyAlgorithm aKeyAlgorithm, int aKeyUsage, otCryptoKeyStorage aKeyPersistence, const uint8_t *aKey, size_t aKeyLen) | Importa una chiave in PSA ITS.  | 
| otPlatCryptoInit(void) | voidInizializza il modulo Crypto.  | 
| otPlatCryptoPbkdf2GenerateKey(const uint8_t *aPassword, uint16_t aPasswordLen, const uint8_t *aSalt, uint16_t aSaltLen, uint32_t aIterationCounter, uint16_t aKeyLen, uint8_t *aKey) | Eseguire PKCS#5 PBKDF2 utilizzando CMAC (AES-CMAC-PRF-128).  | 
| otPlatCryptoRandomDeinit(void) | voidDeinizializza il generatore di numeri pseudocasuali con protezione crittografica (CSPRNG).  | 
| otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize) | Riempie un determinato buffer con byte casuali con protezione crittografica.  | 
| otPlatCryptoRandomInit(void) | voidInizializzare il generatore di numeri pseudocasuali con protezione crittografica (CSPRNG).  | 
| otPlatCryptoSha256Deinit(otCryptoContext *aContext) | Annulla l'inizializzazione dell'operazione SHA-256.  | 
| otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize) | Completa l'operazione SHA-256.  | 
| otPlatCryptoSha256Init(otCryptoContext *aContext) | Inizializzare l'operazione SHA-256.  | 
| otPlatCryptoSha256Start(otCryptoContext *aContext) | Avvia l'operazione SHA-256.  | 
| otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength) | Aggiorna l'operazione SHA-256 con il nuovo input.  | 
| Strutture | |
|---|---|
| otCryptoContext | Archivia l'oggetto di contesto per le API della piattaforma. | 
| otCryptoKey | Rappresenta il materiale della chiave richiesto per le operazioni crittografiche. | 
| otPlatCryptoEcdsaKeyPair | Rappresenta una coppia di chiavi ECDSA (chiavi pubbliche e private). | 
| otPlatCryptoEcdsaPublicKey | Rappresenta una chiave pubblica ECDSA. | 
| otPlatCryptoEcdsaSignature | Rappresenta una firma ECDSA. | 
| otPlatCryptoSha256Hash | Rappresenta un hash SHA-256. | 
Enumerazioni
enum anonimo
anonymous enum
Definisce i flag di utilizzo delle chiavi.
| Proprietà | |
|---|---|
| OT_CRYPTO_KEY_USAGE_DECRYPT | Utilizzo chiave: AES ECB. | 
| OT_CRYPTO_KEY_USAGE_ENCRYPT | Utilizzo della chiave: crittografia (definita dal fornitore). | 
| OT_CRYPTO_KEY_USAGE_EXPORT | Utilizzo della chiave: la chiave può essere esportata. | 
| OT_CRYPTO_KEY_USAGE_NONE | Il campo Utilizzo chiave: il campo Utilizzo della chiave è vuoto. | 
| OT_CRYPTO_KEY_USAGE_SIGN_HASH | Utilizzo della chiave: firma hash. | 
| OT_CRYPTO_KEY_USAGE_VERIFY_HASH | Utilizzo chiave: verifica hash. | 
otCryptoKeyAlgorithm
otCryptoKeyAlgorithm
Definisce gli algoritmi chiave.
| Proprietà | |
|---|---|
| OT_CRYPTO_KEY_ALG_AES_ECB | Algoritmo chiave: AES ECB. | 
| OT_CRYPTO_KEY_ALG_ECDSA | Algoritmo chiave: ECDSA. | 
| OT_CRYPTO_KEY_ALG_HMAC_SHA_256 | Algoritmo chiave: HMAC SHA-256. | 
| OT_CRYPTO_KEY_ALG_VENDOR | Algoritmo chiave: definito dal fornitore. | 
otCryptoKeyStorage
otCryptoKeyStorage
Definisce i tipi di archiviazione delle chiavi.
| Proprietà | |
|---|---|
| OT_CRYPTO_KEY_STORAGE_PERSISTENT | Persistenza della chiave: la chiave è permanente. | 
| OT_CRYPTO_KEY_STORAGE_VOLATILE | Persistenza della chiave: la chiave è volatile. | 
otCryptoKeyType
otCryptoKeyType
Definisce i tipi di chiavi.
| Proprietà | |
|---|---|
| OT_CRYPTO_KEY_TYPE_AES | Tipo di chiave: AES. | 
| OT_CRYPTO_KEY_TYPE_ECDSA | Tipo di chiave: ECDSA. | 
| OT_CRYPTO_KEY_TYPE_HMAC | Tipo di chiave: HMAC. | 
| OT_CRYPTO_KEY_TYPE_RAW | Tipo di chiave: dati non elaborati. | 
Typedef
otCryptoContext
struct otCryptoContext otCryptoContext
otCryptoKey
struct otCryptoKey otCryptoKey
otCryptoKeyRef
uint32_t otCryptoKeyRef
Questo tipo di dati rappresenta il riferimento chiave.
otPlatCryptoEcdsaKeyPair
struct otPlatCryptoEcdsaKeyPair otPlatCryptoEcdsaKeyPair
otPlatCryptoEcdsaPublicKey
struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey
otPlatCryptoEcdsaSignature
struct otPlatCryptoEcdsaSignature otPlatCryptoEcdsaSignature
otPlatCryptoSha256Hash
struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash
Rappresenta un hash SHA-256.
Variabili
OT_TOOL_PACKED_END
OT_TOOL_PACKED_BEGIN struct otPlatCryptoSha256Hash OT_TOOL_PACKED_END
Funzioni
otPlatCryptoAesEncrypt
otError otPlatCryptoAesEncrypt( otCryptoContext *aContext, const uint8_t *aInput, uint8_t *aOutput )
Criptare i dati forniti.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoAesFree
otError otPlatCryptoAesFree( otCryptoContext *aContext )
Libera il contesto AES.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoAesInit
otError otPlatCryptoAesInit( otCryptoContext *aContext )
Inizializzare l'operazione AES.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoAesSetKey
otError otPlatCryptoAesSetKey( otCryptoContext *aContext, const otCryptoKey *aKey )
Imposta la chiave per il funzionamento con AES.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoDestroyKey
otError otPlatCryptoDestroyKey( otCryptoKeyRef aKeyRef )
Elimina una chiave archiviata in PSA ITS.
| Dettagli | |||||
|---|---|---|---|---|---|
| Parametri | 
 | ||||
| Valori restituiti | 
 | ||||
otPlatCryptoEcdsaExportPublicKey
otError otPlatCryptoEcdsaExportPublicKey( otCryptoKeyRef aKeyRef, otPlatCryptoEcdsaPublicKey *aPublicKey )
Recupera la chiave pubblica associata dal riferimento alla chiave passato.
La chiave pubblica viene archiviata in modo diverso a seconda della libreria backend di crittografia utilizzata (OPENTHREAD_CONFIG_CRYPTO_LIB).
Questa API deve assicurarsi di restituire la chiave pubblica come rappresentazione in sequenza di byte di un punto della curva non compresso (RFC 6605 - sec 4)
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoEcdsaGenerateAndImportKey
otError otPlatCryptoEcdsaGenerateAndImportKey( otCryptoKeyRef aKeyRef )
Genera e importa una nuova coppia di chiavi ECDSA al riferimento passato.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoEcdsaGenerateKey
otError otPlatCryptoEcdsaGenerateKey( otPlatCryptoEcdsaKeyPair *aKeyPair )
Genera e compila il buffer di output con una nuova coppia di chiavi ECDSA.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoEcdsaGetPublicKey
otError otPlatCryptoEcdsaGetPublicKey( const otPlatCryptoEcdsaKeyPair *aKeyPair, otPlatCryptoEcdsaPublicKey *aPublicKey )
Recupera la chiave pubblica associata dal contesto di input.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoEcdsaSign
otError otPlatCryptoEcdsaSign( const otPlatCryptoEcdsaKeyPair *aKeyPair, const otPlatCryptoSha256Hash *aHash, otPlatCryptoEcdsaSignature *aSignature )
Calcola la firma ECDSA per un messaggio con hash utilizzando la chiave privata dal contesto di input.
Utilizza la procedura di generazione della firma digitale deterministica da RFC 6979.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoEcdsaSignUsingKeyRef
otError otPlatCryptoEcdsaSignUsingKeyRef( otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, otPlatCryptoEcdsaSignature *aSignature )
Calcola la firma ECDSA per un messaggio con hash utilizzando il riferimento alla chiave passato.
Utilizza la procedura di generazione della firma digitale deterministica da RFC 6979.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoEcdsaVerify
otError otPlatCryptoEcdsaVerify( const otPlatCryptoEcdsaPublicKey *aPublicKey, const otPlatCryptoSha256Hash *aHash, const otPlatCryptoEcdsaSignature *aSignature )
Utilizza la chiave del contesto di input per verificare la firma ECDSA di un messaggio con hash.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoEcdsaVerifyUsingKeyRef
otError otPlatCryptoEcdsaVerifyUsingKeyRef( otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, const otPlatCryptoEcdsaSignature *aSignature )
Utilizza il riferimento chiave per verificare la firma ECDSA di un messaggio con hash.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoExportKey
otError otPlatCryptoExportKey( otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen )
Esporta una chiave archiviata in PSA ITS.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoHasKey
bool otPlatCryptoHasKey( otCryptoKeyRef aKeyRef )
Verifica se al riferimento chiave passato è associata una chiave nell'ITS di PSA.
| Dettagli | |||||
|---|---|---|---|---|---|
| Parametri | 
 | ||||
| Valori restituiti | 
 | ||||
otPlatCryptoHkdfDeinit
otError otPlatCryptoHkdfDeinit( otCryptoContext *aContext )
Annulla l'inizializzazione del contesto HKDF.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHkdfExpand
otError otPlatCryptoHkdfExpand( otCryptoContext *aContext, const uint8_t *aInfo, uint16_t aInfoLength, uint8_t *aOutputKey, uint16_t aOutputKeyLength )
Esegui il passaggio di espansione HKDF.
| Dettagli | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||||
| Valori restituiti | 
 | ||||||||||
otPlatCryptoHkdfExtract
otError otPlatCryptoHkdfExtract( otCryptoContext *aContext, const uint8_t *aSalt, uint16_t aSaltLength, const otCryptoKey *aInputKey )
Esegui il passaggio di estrazione HKDF.
| Dettagli | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||
| Valori restituiti | 
 | ||||||||
otPlatCryptoHkdfInit
otError otPlatCryptoHkdfInit( otCryptoContext *aContext )
Inizializza il contesto HKDF.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHmacSha256Deinit
otError otPlatCryptoHmacSha256Deinit( otCryptoContext *aContext )
Annulla l'inizializzazione dell'operazione HMAC.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHmacSha256Finish
otError otPlatCryptoHmacSha256Finish( otCryptoContext *aContext, uint8_t *aBuf, size_t aBufLength )
Completa l'operazione HMAC.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHmacSha256Init
otError otPlatCryptoHmacSha256Init( otCryptoContext *aContext )
Inizializzare l'operazione HMAC.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHmacSha256Start
otError otPlatCryptoHmacSha256Start( otCryptoContext *aContext, const otCryptoKey *aKey )
Avvia operazione HMAC.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoHmacSha256Update
otError otPlatCryptoHmacSha256Update( otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength )
Aggiorna l'operazione HMAC con un nuovo input.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoImportKey
otError otPlatCryptoImportKey( otCryptoKeyRef *aKeyRef, otCryptoKeyType aKeyType, otCryptoKeyAlgorithm aKeyAlgorithm, int aKeyUsage, otCryptoKeyStorage aKeyPersistence, const uint8_t *aKey, size_t aKeyLen )
Importa una chiave in PSA ITS.
Se OT_CRYPTO_KEY_STORAGE_VOLATILE viene passato per aKeyPersistence, viene restituitoaKeyRef, il valore iniziale non è importante e l'API della piattaforma DEVE aggiornarlo per restituire il nuovo riferimento della chiave.
      | Dettagli | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||||||||
| Valori restituiti | 
 | ||||||||||||||
Questa API viene utilizzata dal core OT solo quando OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE è abilitato. 
otPlatCryptoInit
void otPlatCryptoInit( void )
Inizializza il modulo Crypto.
otPlatCryptoPbkdf2GeneraChiave
otError otPlatCryptoPbkdf2GenerateKey( const uint8_t *aPassword, uint16_t aPasswordLen, const uint8_t *aSalt, uint16_t aSaltLen, uint32_t aIterationCounter, uint16_t aKeyLen, uint8_t *aKey )
Eseguire PKCS#5 PBKDF2 utilizzando CMAC (AES-CMAC-PRF-128).
| Dettagli | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||||||||||
| Valori restituiti | 
 | ||||||||||||||
otPlatCryptoRandomDeinit
void otPlatCryptoRandomDeinit( void )
Deinizializza il generatore di numeri pseudocasuali con protezione crittografica (CSPRNG).
otPlatCryptoRandomGet
otError otPlatCryptoRandomGet( uint8_t *aBuffer, uint16_t aSize )
Riempie un determinato buffer con byte casuali con protezione crittografica.
| Dettagli | |||||
|---|---|---|---|---|---|
| Parametri | 
 | ||||
| Valori restituiti | 
 | ||||
otPlatCryptoRandomInit
void otPlatCryptoRandomInit( void )
Inizializzare il generatore di numeri pseudocasuali con protezione crittografica (CSPRNG).
otPlatCryptoSha256Deinit
otError otPlatCryptoSha256Deinit( otCryptoContext *aContext )
Annulla l'inizializzazione dell'operazione SHA-256.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoSha256Finish
otError otPlatCryptoSha256Finish( otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize )
Completa l'operazione SHA-256.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoSha256Init
otError otPlatCryptoSha256Init( otCryptoContext *aContext )
Inizializzare l'operazione SHA-256.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoSha256Start
otError otPlatCryptoSha256Start( otCryptoContext *aContext )
Avvia l'operazione SHA-256.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
otPlatCryptoSha256Update
otError otPlatCryptoSha256Update( otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength )
Aggiorna l'operazione SHA-256 con il nuovo input.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri | 
 | ||||||
| Valori restituiti | 
 | ||||||
Macro
OT_CRYPTO_ECDSA_MAX_DER_SIZE
OT_CRYPTO_ECDSA_MAX_DER_SIZE 125
Dimensione massima del buffer (in byte) per la rappresentazione della coppia di chiavi EDCSA in formato DER.
OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE
OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE 64
Dimensione del buffer (in byte) per rappresentare la chiave pubblica EDCSA.
OT_CRYPTO_ECDSA_SIGNATURE_SIZE
OT_CRYPTO_ECDSA_SIGNATURE_SIZE 64
Dimensione del buffer (in byte) per rappresentare la firma EDCSA.
OT_CRYPTO_PBDKF2_MAX_SALT_SIZE
OT_CRYPTO_PBDKF2_MAX_SALT_SIZE 30
Lunghezza massima SALT PBKDF2: prefisso del sale (6) + panid esteso (8) + nome della rete (16)
OT_CRYPTO_SHA256_HASH_SIZE
OT_CRYPTO_SHA256_HASH_SIZE 32
Lunghezza dell'hash SHA256 (in byte).
Risorse
Gli argomenti di riferimento dell'API OpenThread provengono dal codice sorgente, disponibile su GitHub. Per saperne di più o per contribuire alla nostra documentazione, consulta la sezione Risorse.