Alex's comments
Change-Id: Iaf7cf0d82b06e3ea3fd03f6a07f17c4d750a15ec
diff --git a/src/detail/crypto-helpers.hpp b/src/detail/crypto-helpers.hpp
index def7187..353942a 100644
--- a/src/detail/crypto-helpers.hpp
+++ b/src/detail/crypto-helpers.hpp
@@ -38,9 +38,22 @@
ECDHState();
~ECDHState();
+ /**
+ * @brief Derive ECDH secret from peer's EC public key and self's private key.
+ *
+ * @param peerkey Peer's EC public key in the uncompressed octet string format.
+ * See details in https://www.openssl.org/docs/man1.1.1/man3/EC_POINT_point2oct.html.
+ * @return const std::vector<uint8_t>& the derived secret.
+ */
const std::vector<uint8_t>&
deriveSecret(const std::vector<uint8_t>& peerkey);
+ /**
+ * @brief Get the Self Pub Key object
+ *
+ * @return const std::vector<uint8_t>& the Self public key in the uncompressed oct string format.
+ * See details in https://www.openssl.org/docs/man1.1.1/man3/EC_POINT_point2oct.html.
+ */
const std::vector<uint8_t>&
getSelfPubKey();
@@ -123,6 +136,8 @@
/**
* @brief Encode the payload into TLV block with Authenticated GCM 128 Encryption.
*
+ * The TLV spec: https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3#242-aes-gcm-encryption.
+ *
* @param tlv_type The TLV TYPE of the encoded block, either ApplicationParameters or Content.
* @param key The AES key used for encryption.
* @param payload The plaintext payload.
@@ -140,6 +155,8 @@
/**
* @brief Decode the payload from TLV block with Authenticated GCM 128 Encryption.
*
+ * The TLV spec: https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3#242-aes-gcm-encryption.
+ *
* @param block The TLV block in the format of NDNCERT protocol.
* @param key The AES key used for encryption.
* @param associatedData The associated data used for authentication.