LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
PE
signature
RsaInfo.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_PE_SIGNATURE_RSA_INFO_H
17
#define LIEF_PE_SIGNATURE_RSA_INFO_H
18
#include <vector>
19
#include <ostream>
20
#include <cstdint>
21
22
#include "
LIEF/visibility.h
"
23
24
namespace
LIEF
{
25
namespace
PE
{
26
class
x509
;
27
29
class
LIEF_API
RsaInfo
{
30
friend
class
x509
;
31
32
public
:
33
using
rsa_ctx_handle
=
void
*;
34
using
bignum_wrapper_t
= std::vector<uint8_t>;
35
36
public
:
37
RsaInfo
(
const
RsaInfo
& other);
38
RsaInfo
(
RsaInfo
&& other);
39
RsaInfo
&
operator=
(
RsaInfo
other);
40
42
bool
has_public_key
()
const
;
43
45
bool
has_private_key
()
const
;
46
48
bignum_wrapper_t
N
()
const
;
49
51
bignum_wrapper_t
E
()
const
;
52
54
bignum_wrapper_t
D
()
const
;
55
57
bignum_wrapper_t
P
()
const
;
58
60
bignum_wrapper_t
Q
()
const
;
61
63
size_t
key_size
()
const
;
64
65
void
swap
(
RsaInfo
& other);
66
operator
bool()
const
;
67
68
LIEF_API
friend
std::ostream&
operator<<
(std::ostream& os,
const
RsaInfo
& info);
69
70
~RsaInfo
();
71
72
private
:
73
RsaInfo
();
74
RsaInfo
(
const
rsa_ctx_handle
ctx);
75
rsa_ctx_handle
ctx_;
76
};
77
78
}
79
}
80
#endif
LIEF::PE::RsaInfo::x509
friend class x509
Definition
RsaInfo.hpp:30
LIEF::PE::RsaInfo::swap
void swap(RsaInfo &other)
LIEF::PE::RsaInfo::P
bignum_wrapper_t P() const
First prime factor.
LIEF::PE::RsaInfo::RsaInfo
RsaInfo(RsaInfo &&other)
LIEF::PE::RsaInfo::N
bignum_wrapper_t N() const
RSA public modulus.
LIEF::PE::RsaInfo::operator=
RsaInfo & operator=(RsaInfo other)
LIEF::PE::RsaInfo::rsa_ctx_handle
void * rsa_ctx_handle
Definition
RsaInfo.hpp:33
LIEF::PE::RsaInfo::Q
bignum_wrapper_t Q() const
Second prime factor.
LIEF::PE::RsaInfo::has_public_key
bool has_public_key() const
True if it embeds a public key.
LIEF::PE::RsaInfo::has_private_key
bool has_private_key() const
True if it embeds a private key.
LIEF::PE::RsaInfo::~RsaInfo
~RsaInfo()
LIEF::PE::RsaInfo::operator<<
friend std::ostream & operator<<(std::ostream &os, const RsaInfo &info)
LIEF::PE::RsaInfo::D
bignum_wrapper_t D() const
RSA private exponent.
LIEF::PE::RsaInfo::E
bignum_wrapper_t E() const
RSA public exponent.
LIEF::PE::RsaInfo::bignum_wrapper_t
std::vector< uint8_t > bignum_wrapper_t
Container for BigInt.
Definition
RsaInfo.hpp:34
LIEF::PE::RsaInfo::key_size
size_t key_size() const
Size of the public modulus (in bits).
LIEF::PE::RsaInfo::RsaInfo
RsaInfo(const RsaInfo &other)
LIEF::PE::x509
Interface over a x509 certificate.
Definition
x509.hpp:43
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:32
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0