
|
My Project
|
Functions | |
| int | wc_SRTP_KDF (const byte *key, word32 keySz, const byte *salt, word32 saltSz, int kdrIdx, const byte *idx, byte *key1, word32 key1Sz, byte *key2, word32 key2Sz, byte *key3, word32 key3Sz) |
| This function derives keys using SRTP KDF algorithm. More... | |
| int | wc_SRTCP_KDF (const byte *key, word32 keySz, const byte *salt, word32 saltSz, int kdrIdx, const byte *idx, byte *key1, word32 key1Sz, byte *key2, word32 key2Sz, byte *key3, word32 key3Sz) |
| This function derives keys using SRTCP KDF algorithm. More... | |
| int | wc_SRTP_KDF_label (const byte *key, word32 keySz, const byte *salt, word32 saltSz, int kdrIdx, const byte *idx, byte label, byte *outKey, word32 outKeySz) |
| This function derives a key with label using SRTP KDF algorithm. More... | |
| int | wc_SRTP_KDF_kdr_to_idx (word32 kdr) |
| This function converts a kdr value to an index to use in SRTP/SRTCP KDF API. More... | |
| int wc_SRTCP_KDF | ( | const byte * | key, |
| word32 | keySz, | ||
| const byte * | salt, | ||
| word32 | saltSz, | ||
| int | kdrIdx, | ||
| const byte * | idx, | ||
| byte * | key1, | ||
| word32 | key1Sz, | ||
| byte * | key2, | ||
| word32 | key2Sz, | ||
| byte * | key3, | ||
| word32 | key3Sz | ||
| ) |
This function derives keys using SRTCP KDF algorithm.
| [in] | key | Key to use with encryption. |
| [in] | keySz | Size of key in bytes. |
| [in] | salt | Random non-secret value. |
| [in] | saltSz | Size of random in bytes. |
| [in] | kdrIdx | Key derivation rate. kdr = 0 when -1, otherwise kdr = 2^kdrIdx. |
| [in] | idx | Index value to XOR in. |
| [out] | key1 | First key. Label value of 0x00. |
| [in] | key1Sz | Size of first key in bytes. |
| [out] | key2 | Second key. Label value of 0x01. |
| [in] | key2Sz | Size of second key in bytes. |
| [out] | key3 | Third key. Label value of 0x02. |
| [in] | key3Sz | Size of third key in bytes. |
Example
| int wc_SRTP_KDF | ( | const byte * | key, |
| word32 | keySz, | ||
| const byte * | salt, | ||
| word32 | saltSz, | ||
| int | kdrIdx, | ||
| const byte * | idx, | ||
| byte * | key1, | ||
| word32 | key1Sz, | ||
| byte * | key2, | ||
| word32 | key2Sz, | ||
| byte * | key3, | ||
| word32 | key3Sz | ||
| ) |
This function derives keys using SRTP KDF algorithm.
| [in] | key | Key to use with encryption. |
| [in] | keySz | Size of key in bytes. |
| [in] | salt | Random non-secret value. |
| [in] | saltSz | Size of random in bytes. |
| [in] | kdrIdx | Key derivation rate. kdr = 0 when -1, otherwise kdr = 2^kdrIdx. |
| [in] | idx | Index value to XOR in. |
| [out] | key1 | First key. Label value of 0x00. |
| [in] | key1Sz | Size of first key in bytes. |
| [out] | key2 | Second key. Label value of 0x01. |
| [in] | key2Sz | Size of second key in bytes. |
| [out] | key3 | Third key. Label value of 0x02. |
| [in] | key3Sz | Size of third key in bytes. |
Example
| int wc_SRTP_KDF_kdr_to_idx | ( | word32 | kdr | ) |
This function converts a kdr value to an index to use in SRTP/SRTCP KDF API.
| [in] | kdr | Key derivation rate to convert. |
Example
| int wc_SRTP_KDF_label | ( | const byte * | key, |
| word32 | keySz, | ||
| const byte * | salt, | ||
| word32 | saltSz, | ||
| int | kdrIdx, | ||
| const byte * | idx, | ||
| byte | label, | ||
| byte * | outKey, | ||
| word32 | outKeySz | ||
| ) |
This function derives a key with label using SRTP KDF algorithm.
This function derives key with label using SRTCP KDF algorithm.
| [in] | key | Key to use with encryption. |
| [in] | keySz | Size of key in bytes. |
| [in] | salt | Random non-secret value. |
| [in] | saltSz | Size of random in bytes. |
| [in] | kdrIdx | Key derivation rate. kdr = 0 when -1, otherwise kdr = 2^kdrIdx. |
| [in] | idx | Index value to XOR in. |
| [in] | label | Label to use when deriving key. |
| [out] | outKey | Derived key. |
| [in] | outKeySz | Size of derived key in bytes. |
Example
| [in] | key | Key to use with encryption. |
| [in] | keySz | Size of key in bytes. |
| [in] | salt | Random non-secret value. |
| [in] | saltSz | Size of random in bytes. |
| [in] | kdrIdx | Key derivation rate. kdr = 0 when -1, otherwise kdr = 2^kdrIdx. |
| [in] | idx | Index value to XOR in. |
| [in] | label | Label to use when deriving key. |
| [out] | outKey | Derived key. |
| [in] | outKeySz | Size of derived key in bytes. |
Example