![]() |
ndn-lite
|
#include "signed-interest.h"#include "../security/ndn-lite-hmac.h"#include "../security/ndn-lite-sha.h"#include "../security/ndn-lite-ecc.h"Functions | |
| static void | _prepare_signature_info (ndn_interest_t *interest, uint8_t signature_type, const ndn_name_t *identity, uint32_t key_id, uint32_t signature_info_nonce, uint64_t timestamp) |
| int | ndn_signed_interest_ecdsa_sign (ndn_interest_t *interest, const ndn_name_t *identity, const ndn_ecc_prv_t *prv_key) |
| Use ECDSA Algorithm to sign the Interest and encode the Signed Interest into wire format. More... | |
| int | ndn_signed_interest_hmac_sign (ndn_interest_t *interest, const ndn_name_t *identity, const ndn_hmac_key_t *hmac_key) |
| Use HMAC Algorithm to sign the Interest and encode the Signed Interest into wire format. More... | |
| int | ndn_signed_interest_digest_sign (ndn_interest_t *interest) |
| Use Digest (SHA256) to sign the Interest and encode the Signed Interest into wire format. More... | |
| int | ndn_signed_interest_ecdsa_verify (const ndn_interest_t *interest, const ndn_ecc_pub_t *pub_key) |
| Verify the ECDSA signature of a decoded Signed Interest. More... | |
| int | ndn_signed_interest_hmac_verify (const ndn_interest_t *interest, const ndn_hmac_key_t *hmac_key) |
| Verify the HMAC signature of a decoded Signed Interest. More... | |
| int | ndn_signed_interest_digest_verify (const ndn_interest_t *interest) |
| Verify the Digest (SHA256) signature of a decoded Signed Interest. More... | |
|
static |
| int ndn_signed_interest_digest_sign | ( | ndn_interest_t * | interest | ) |
Use Digest (SHA256) to sign the Interest and encode the Signed Interest into wire format.
This function will automatically set signature info and signature value.
| encoder. | Output. The encoder to keep the encoded Signed Interest. The encoder should be inited to proper output buffer. |
| interest. | Input. The Interest to be signed and encoded. |
| int ndn_signed_interest_digest_verify | ( | const ndn_interest_t * | interest | ) |
Verify the Digest (SHA256) signature of a decoded Signed Interest.
| interest. | Input. The decoded Signed Interest whose signature to be verified. |
| int ndn_signed_interest_ecdsa_sign | ( | ndn_interest_t * | interest, |
| const ndn_name_t * | identity, | ||
| const ndn_ecc_prv_t * | prv_key | ||
| ) |
Use ECDSA Algorithm to sign the Interest and encode the Signed Interest into wire format.
This function will automatically set signature info and signature value.
| encoder. | Output. The encoder to keep the encoded Signed Interest. The encoder should be inited to proper output buffer. |
| interest. | Input. The Interest to be signed and encoded. |
| producer_identity. | Input. The producer's identity name. |
| prv_key. | Input. The private ECC key used to generate the signature. |
| int ndn_signed_interest_ecdsa_verify | ( | const ndn_interest_t * | interest, |
| const ndn_ecc_pub_t * | pub_key | ||
| ) |
Verify the ECDSA signature of a decoded Signed Interest.
| interest. | Input. The decoded Signed Interest whose signature to be verified. |
| pub_key. | Input. The ECC public key used to verify the Signed Interest signature. |
| int ndn_signed_interest_hmac_sign | ( | ndn_interest_t * | interest, |
| const ndn_name_t * | identity, | ||
| const ndn_hmac_key_t * | hmac_key | ||
| ) |
Use HMAC Algorithm to sign the Interest and encode the Signed Interest into wire format.
This function will automatically set signature info and signature value.
| encoder. | Output. The encoder to keep the encoded Signed Interest. The encoder should be inited to proper output buffer. |
| interest. | Input. The Interest to be signed and encoded. |
| producer_identity. | Input. The producer's identity name. |
| prv_key. | Input. The private HMAC key used to generate the signature. |
| int ndn_signed_interest_hmac_verify | ( | const ndn_interest_t * | interest, |
| const ndn_hmac_key_t * | hmac_key | ||
| ) |
Verify the HMAC signature of a decoded Signed Interest.
| interest. | Input. The decoded Signed Interest whose signature to be verified. |
| hmac_key. | Input. The HMAC public key used to verify the Signed Interest signature. |
1.8.15