26 #ifndef NDN_RSA_ALGORITHM_HPP
27 #define NDN_RSA_ALGORITHM_HPP
29 #include "../../security/key-params.hpp"
30 #include "encrypt-params.hpp"
31 #include "../encrypt-key.hpp"
32 #include "../decrypt-key.hpp"
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
An EncryptKey supplies the key for encrypt.
Definition: encrypt-key.hpp:34
Definition: decrypt-key.hpp:34
static EncryptKey deriveEncryptKey(const Blob &keyBits)
Derive a new encrypt key from the given decrypt key value.
Definition: rsa-algorithm.cpp:61
Definition: key-params.hpp:59
An EncryptParams holds an algorithm type and other parameters used to encrypt and decrypt...
Definition: encrypt-params.hpp:36
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
The RsaAlgorithm class provides static methods to manipulate keys, encrypt and decrypt using RSA...
Definition: rsa-algorithm.hpp:41
static DecryptKey generateKey(const RsaKeyParams ¶ms)
Generate a new random decrypt key for RSA based on the given params.
Definition: rsa-algorithm.cpp:40
static Blob decrypt(const Blob &keyBits, const Blob &encryptedData, const EncryptParams ¶ms)
Decrypt the encryptedData using the keyBits according the encrypt params.
static Blob encrypt(const Blob &keyBits, const Blob &plainData, const EncryptParams ¶ms)
Encrypt the plainData using the keyBits according the encrypt params.