libfilezilla
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Functions
encryption.hpp File Reference

Asymmetric encryption scheme using X25519. More...

#include "libfilezilla.hpp"
#include <vector>
#include <string>
Include dependency graph for encryption.hpp:

Go to the source code of this file.

Classes

class  public_key
 Represents a X25519 public key with associated salt. More...
 
class  private_key
 Represents a X25519 private key with associated salt. More...
 

Namespaces

 fz
 The namespace used by libfilezilla.
 

Functions

std::vector< uint8_t > encrypt (std::vector< uint8_t > const &plain, public_key const &pub, bool authenticated=true)
 Encrypt the plaintext to the given public key. More...
 
std::vector< uint8_t > encrypt (std::string_view const &plain, public_key const &pub, bool authenticated=true)
 
std::vector< uint8_t > encrypt (uint8_t const *plain, size_t size, public_key const &pub, bool authenticated=true)
 
std::vector< uint8_t > decrypt (std::vector< uint8_t > const &chiper, private_key const &priv, bool authenticated=true)
 Decrypt the ciphertext using the given private key. More...
 
std::vector< uint8_t > decrypt (std::string_view const &chiper, private_key const &priv, bool authenticated=true)
 
std::vector< uint8_t > decrypt (uint8_t const *cipher, size_t size, private_key const &priv, bool authenticated=true)
 

Detailed Description

Asymmetric encryption scheme using X25519.

See RFC 7748 for the X22519 specs.