Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
dh.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
fc/crypto/openssl.hpp
>
3
#include <vector>
4
#include <
stdint.h
>
5
6
namespace
fc
{
7
8
struct
diffie_hellman
{
9
diffie_hellman
():valid(0),
g
(5){}
10
bool
generate_params
(
int
s
,
uint8_t
g
);
11
bool
generate_pub_key
();
12
bool
compute_shared_key
(
const
char
*
buf
,
uint32_t
s
);
13
bool
compute_shared_key
(
const
std::vector<char>& pubk);
14
bool
validate
();
15
16
std::vector<char>
p
;
17
std::vector<char>
pub_key
;
18
std::vector<char>
priv_key
;
19
std::vector<char>
shared_key
;
20
bool
valid
;
21
uint8_t
g
;
22
};
23
24
}
// namespace fc
25
26
fc
namespace sysio::chain
Definition
authority.cpp:3
openssl.hpp
stdint.h
uint32_t
unsigned int uint32_t
Definition
stdint.h:126
uint8_t
unsigned char uint8_t
Definition
stdint.h:124
fc::diffie_hellman
Definition
dh.hpp:8
fc::diffie_hellman::priv_key
std::vector< char > priv_key
Definition
dh.hpp:18
fc::diffie_hellman::compute_shared_key
bool compute_shared_key(const char *buf, uint32_t s)
Definition
dh.cpp:64
fc::diffie_hellman::validate
bool validate()
Definition
dh.cpp:26
fc::diffie_hellman::p
std::vector< char > p
Definition
dh.hpp:16
fc::diffie_hellman::g
uint8_t g
Definition
dh.hpp:21
fc::diffie_hellman::shared_key
std::vector< char > shared_key
Definition
dh.hpp:19
fc::diffie_hellman::diffie_hellman
diffie_hellman()
Definition
dh.hpp:9
fc::diffie_hellman::generate_params
bool generate_params(int s, uint8_t g)
Definition
dh.cpp:13
fc::diffie_hellman::pub_key
std::vector< char > pub_key
Definition
dh.hpp:17
fc::diffie_hellman::generate_pub_key
bool generate_pub_key()
Definition
dh.cpp:37
fc::diffie_hellman::valid
bool valid
Definition
dh.hpp:20
s
char * s
Definition
yubihsm_pkcs11.c:524
buf
uint8_t buf[2048]
Definition
yubihsm_pkcs11.c:4770
libraries
fc
include
fc
crypto
dh.hpp
Generated by
1.12.0