nl:: Weave:: التشفير
تشمل مساحة الاسم هذه جميع الواجهات ضمن Weave للحصول على دعم التشفير المشترك.
الملخّص
تعداد |
|
---|---|
X963EncodedPointFormat
|
تعداد |
رفوف النوع |
|
---|---|
AES128CTRDRBG
|
typedef |
AES128CTRMode
|
typedef |
AES256CTRMode
|
typedef |
EntropyFunct)(uint8_t *buf, size_t bufSize)
|
typedefint(*
توقيع دالة تُستخدم لجمع البيانات العشوائية من مصدر إنتروبيا. |
HKDFSHA1
|
typedef |
HKDFSHA256
|
typedef |
HMACSHA1
|
typedef |
HMACSHA256
|
typedef |
الدوال |
|
---|---|
ClearSecretData(uint8_t *buf, uint32_t len)
|
NL_DLL_EXPORT void
يؤدي إلى محو أول
len بايت من مساحة الذاكرة buf |
ConstantTimeCompare(const uint8_t *buf1, const uint8_t *buf2, uint16_t len)
|
bool
يقارِن أول
len بايت من مساحة الذاكرة buf1 ومساحة الذاكرة buf2 . |
DecodeBIGNUMValueLE(BIGNUM & val, uint16_t size, const uint8_t *& p)
|
|
DecodeECDSASignature(const EncodedECDSASignature & encodedSig, ECDSA_SIG *& sig)
|
|
DecodeECKey(OID curveOID, const EncodedECPrivateKey *encodedPrivKey, const EncodedECPublicKey *encodedPubKey, EC_KEY *& ecKey)
|
NL_DLL_EXPORT WEAVE_ERROR
|
DecodeX962ECPoint(const uint8_t *encodedPoint, uint16_t encodedPointLen, EC_GROUP *group, EC_POINT *& point)
|
NL_DLL_EXPORT WEAVE_ERROR
|
DecodeX962ECPoint(const uint8_t *encodedPoint, uint16_t encodedPointLen, BIGNUM *& x, BIGNUM *& y)
|
|
ECDHComputeSharedSecret(OID curveOID, const EC_GROUP *ecGroup, const EC_POINT *pubKeyPoint, const BIGNUM *privKeyBN, uint8_t *sharedSecretBuf, uint16_t sharedSecretBufSize, uint16_t & sharedSecretLen)
|
NL_DLL_EXPORT WEAVE_ERROR
|
ECDHComputeSharedSecret(OID curveOID, const EncodedECPublicKey & encodedPubKey, const EncodedECPrivateKey & encodedPrivKey, uint8_t *sharedSecretBuf, uint16_t sharedSecretBufSize, uint16_t & sharedSecretLen)
|
|
ECDSASigToFixedLenSig(OID curveOID, const ECDSA_SIG *ecSig, uint8_t *fixedLenSig)
|
|
ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
void
|
ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
|
int
|
EncodeBIGNUMValueLE(const BIGNUM & val, uint16_t size, uint8_t *& p)
|
|
EncodeECDSASignature(const ECDSA_SIG *sig, EncodedECDSASignature & encodedSig)
|
|
EncodeX962ECPoint(OID curveOID, EC_GROUP *ecGroup, const EC_POINT *point, uint8_t *buf, uint16_t bufSize, uint16_t & encodedPointLen)
|
NL_DLL_EXPORT WEAVE_ERROR
|
FixedLenSigToECDSASig(OID curveOID, const uint8_t *fixedLenSig, ECDSA_SIG *& ecSig)
|
|
GenerateAndEncodeWeaveHMACSignature(OID sigAlgoOID, TLVWriter & writer, uint64_t tag, const uint8_t *data, uint16_t dataLen, const uint8_t *key, uint16_t keyLen)
|
إنشاء توقيع WAve HMAC وترميزه.
|
GenerateAndEncodeWeaveRSASignature(OID sigAlgoOID, TLVWriter & writer, uint64_t tag, const uint8_t *hash, uint8_t hashLen, const uint8_t *keyDER, uint16_t keyDERLen)
|
إنشاء توقيع Weave RSA وترميزه.
|
GenerateECDHKey(OID curveOID, EncodedECPublicKey & encodedPubKey, EncodedECPrivateKey & encodedPrivKey)
|
|
GenerateECDSASignature(OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECPrivateKey & encodedPrivKey, EncodedECDSASignature & encodedSig)
|
|
GenerateECDSASignature(OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECPrivateKey & encodedPrivKey, uint8_t *fixedLenSig)
|
|
GetCurveG(OID curveOID, EncodedECPublicKey & encodedPubKey)
|
|
GetCurveSize(const OID curveOID, const EC_GROUP *ecGroup)
|
int
|
GetCurveSize(const OID curveOID)
|
int
يمكنك الحصول على حجم المنحنى الإهليلجي (بالبايت).
|
GetECGroupForCurve(OID curveOID, EC_GROUP *& ecGroup)
|
NL_DLL_EXPORT WEAVE_ERROR
|
ReverseBytes(uint8_t *buf, size_t len)
|
void
|
ShaNIDFromSigAlgoOID(OID sigAlgoOID)
|
int
|
VerifyECDSASignature(OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECDSASignature & encodedSig, const EncodedECPublicKey & encodedPubKey)
|
|
VerifyECDSASignature(OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const uint8_t *fixedLenSig, const EncodedECPublicKey & encodedPubKey)
|
|
VerifyHMACSignature(OID sigAlgoOID, const uint8_t *data, uint16_t dataLen, const EncodedHMACSignature & sig, const uint8_t *key, uint16_t keyLen)
|
تحقّق من توقيع Weave HMAC.
|
VerifyRSASignature(OID sigAlgoOID, const uint8_t *hash, uint8_t hashLen, const EncodedRSASignature & sig, const uint8_t *certDER, uint16_t certDERLen)
|
التحقّق من توقيع RSA Weave.
|
تعداد
تنسيق X963EncodedPointFormat
X963EncodedPointFormat
رفوف النوع
AES128CTRDRBG
CTR_DRBG< Platform::Security::AES128BlockCipherEnc > AES128CTRDRBG
وضع AES128CTR
CTRMode< Platform::Security::AES128BlockCipherEnc > AES128CTRMode
وضع AES256CTR
CTRMode< Platform::Security::AES256BlockCipherEnc > AES256CTRMode
موسيقى إنتروبيا
int(* EntropyFunct)(uint8_t *buf, size_t bufSize)
توقيع دالة تُستخدم لجمع البيانات العشوائية من مصدر إنتروبيا.
HKDFSHA1
HKDF< Platform::Security::SHA1 > HKDFSHA1
HKDFSHA256
HKDF< Platform::Security::SHA256 > HKDFSHA256
HMACSHA1
HMAC< Platform::Security::SHA1 > HMACSHA1
HMACSHA256
HMAC< Platform::Security::SHA256 > HMACSHA256
الدوال
محو البيانات السرية
NL_DLL_EXPORT void ClearSecretData( uint8_t *buf, uint32_t len )
يؤدي إلى محو أول len
بايت من مساحة الذاكرة buf
في عملية التنفيذ هذه، يتم ملء أول len
بايت من مساحة الذاكرة buf
بأصفار.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
مقارنة الوقت الثابت
bool ConstantTimeCompare( const uint8_t *buf1, const uint8_t *buf2, uint16_t len )
يقارِن أول len
بايت من مساحة الذاكرة buf1
ومساحة الذاكرة buf2
.
الوقت الذي تتخذه هذه الدالة مستقل عن البيانات في مناطق الذاكرة buf1
وbuf2
.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||
قيم الإرجاع |
|
فك الترميزBIGNUMValueLE
WEAVE_ERROR DecodeBIGNUMValueLE( BIGNUM & val, uint16_t size, const uint8_t *& p )
فك ترميز DSA
WEAVE_ERROR DecodeECDSASignature( const EncodedECDSASignature & encodedSig, ECDSA_SIG *& sig )
مفتاح فك التشفير
NL_DLL_EXPORT WEAVE_ERROR DecodeECKey( OID curveOID, const EncodedECPrivateKey *encodedPrivKey, const EncodedECPublicKey *encodedPubKey, EC_KEY *& ecKey )
فك الترميزX962EC
NL_DLL_EXPORT WEAVE_ERROR DecodeX962ECPoint( const uint8_t *encodedPoint, uint16_t encodedPointLen, EC_GROUP *group, EC_POINT *& point )
فك الترميزX962EC
WEAVE_ERROR DecodeX962ECPoint( const uint8_t *encodedPoint, uint16_t encodedPointLen, BIGNUM *& x, BIGNUM *& y )
ECDHComputeSharedSecret
NL_DLL_EXPORT WEAVE_ERROR ECDHComputeSharedSecret( OID curveOID, const EC_GROUP *ecGroup, const EC_POINT *pubKeyPoint, const BIGNUM *privKeyBN, uint8_t *sharedSecretBuf, uint16_t sharedSecretBufSize, uint16_t & sharedSecretLen )
ECDHComputeSharedSecret
WEAVE_ERROR ECDHComputeSharedSecret( OID curveOID, const EncodedECPublicKey & encodedPubKey, const EncodedECPrivateKey & encodedPrivKey, uint8_t *sharedSecretBuf, uint16_t sharedSecretBufSize, uint16_t & sharedSecretLen )
ECDSASigToFixedLenSig
WEAVE_ERROR ECDSASigToFixedLenSig( OID curveOID, const ECDSA_SIG *ecSig, uint8_t *fixedLenSig )
ECDSA_SIG_get0
void ECDSA_SIG_get0( const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps )
ECDSA_SIG_set0
int ECDSA_SIG_set0( ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s )
ترميز BIGNUMValueLE
WEAVE_ERROR EncodeBIGNUMValueLE( const BIGNUM & val, uint16_t size, uint8_t *& p )
ترميز مؤتمر DSA
WEAVE_ERROR EncodeECDSASignature( const ECDSA_SIG *sig, EncodedECDSASignature & encodedSig )
En9X962ECPoint
NL_DLL_EXPORT WEAVE_ERROR EncodeX962ECPoint( OID curveOID, EC_GROUP *ecGroup, const EC_POINT *point, uint8_t *buf, uint16_t bufSize, uint16_t & encodedPointLen )
ثابتLenSigToECDSASig
WEAVE_ERROR FixedLenSigToECDSASig( OID curveOID, const uint8_t *fixedLenSig, ECDSA_SIG *& ecSig )
GenerateAndEncodeWeaveHMACSignature
WEAVE_ERROR GenerateAndEncodeWeaveHMACSignature( OID sigAlgoOID, TLVWriter & writer, uint64_t tag, const uint8_t *data, uint16_t dataLen, const uint8_t *key, uint16_t keyLen )
إنشاء توقيع WAve HMAC وترميزه.
لحساب توقيع HMAC لبيانات معيّنة باستخدام مفتاح سري وكتابة التوقيع كبنية توقيع WeAve HMAC إلى كاتب TLV المحدّد مع العلامة المحددة.
التفاصيل | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||||||||||
قيم الإرجاع |
|
GenerateAndEncodeWeaveRSASignature
WEAVE_ERROR GenerateAndEncodeWeaveRSASignature( OID sigAlgoOID, TLVWriter & writer, uint64_t tag, const uint8_t *hash, uint8_t hashLen, const uint8_t *keyDER, uint16_t keyDERLen )
إنشاء توقيع Weave RSA وترميزه.
لحساب توقيع RSA باستخدام مفتاح خاص بترميز RSA معيّن وتجزئة الرسالة وكتابة التوقيع كبنية SwAve RSASignature إلى كاتب TLV المحدد بالعلامة المعيّنة.
التفاصيل | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||||||||||
قيم الإرجاع |
|
إنشاء مفتاح ECECHH
WEAVE_ERROR GenerateECDHKey( OID curveOID, EncodedECPublicKey & encodedPubKey, EncodedECPrivateKey & encodedPrivKey )
إنشاء توقيع توقيع ديناميكي على شبكة البحث
WEAVE_ERROR GenerateECDSASignature( OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECPrivateKey & encodedPrivKey, EncodedECDSASignature & encodedSig )
إنشاء توقيع توقيع ديناميكي على شبكة البحث
WEAVE_ERROR GenerateECDSASignature( OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECPrivateKey & encodedPrivKey, uint8_t *fixedLenSig )
GetCurveG
WEAVE_ERROR GetCurveG( OID curveOID, EncodedECPublicKey & encodedPubKey )
GetCurveSize
int GetCurveSize( const OID curveOID, const EC_GROUP *ecGroup )
GetCurveSize
int GetCurveSize( const OID curveOID )
يمكنك الحصول على حجم المنحنى الإهليلجي (بالبايت).
التفاصيل | |||
---|---|---|---|
المعلَمات |
|
||
قيم الإرجاع |
|
GetECGroupForCurve
NL_DLL_EXPORT WEAVE_ERROR GetECGroupForCurve( OID curveOID, EC_GROUP *& ecGroup )
عكسية
void ReverseBytes( uint8_t *buf, size_t len )
ShaNIDFromSigAlgoOID
int ShaNIDFromSigAlgoOID( OID sigAlgoOID )
إثبات صحة توقيع ECDSA
WEAVE_ERROR VerifyECDSASignature( OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECDSASignature & encodedSig, const EncodedECPublicKey & encodedPubKey )
إثبات صحة توقيع ECDSA
WEAVE_ERROR VerifyECDSASignature( OID curveOID, const uint8_t *msgHash, uint8_t msgHashLen, const uint8_t *fixedLenSig, const EncodedECPublicKey & encodedPubKey )
إثبات صحة توقيع MAC
WEAVE_ERROR VerifyHMACSignature( OID sigAlgoOID, const uint8_t *data, uint16_t dataLen, const EncodedHMACSignature & sig, const uint8_t *key, uint16_t keyLen )
تحقّق من توقيع Weave HMAC.
التحقّق من توقيع HMAC باستخدام بيانات معيّنة ومفتاح سري يمكن استخدامه للتحقّق من التوقيع
التفاصيل | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||||||||
قيم الإرجاع |
|
إثبات الملكية
WEAVE_ERROR VerifyRSASignature( OID sigAlgoOID, const uint8_t *hash, uint8_t hashLen, const EncodedRSASignature & sig, const uint8_t *certDER, uint16_t certDERLen )
التحقّق من توقيع RSA Weave.
التحقّق من توقيع RSA باستخدام تجزئة بيانات محددة وشهادة RSA مشفّرة X509 تحتوي على المفتاح العام المطلوب استخدامه للتحقّق من التوقيع.
التفاصيل | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||||||||
قيم الإرجاع |
|