nettle  3.7.3
About: Nettle is a low-level cryptographic library.
  Fossies Dox: nettle-3.7.3.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pkcs1-sec-decrypt.c File Reference
#include <assert.h>
#include <string.h>
#include "memops.h"
#include "gmp-glue.h"
#include "pkcs1-internal.h"
Include dependency graph for pkcs1-sec-decrypt.c:

Go to the source code of this file.

Macros

#define NOT_EQUAL(a, b)    ((0U - ((uint32_t)(a) ^ (uint32_t)(b))) >> 31)
 
#define EQUAL(a, b)    ((((uint32_t)(a) ^ (uint32_t)(b)) - 1U) >> 31)
 
#define GREATER_OR_EQUAL(a, b)    (1U - (((uint32_t)(a) - (uint32_t)(b)) >> 31))
 

Functions

int _nettle_pkcs1_sec_decrypt (size_t length, uint8_t *message, size_t padded_message_length, const volatile uint8_t *padded_message)
 
int _nettle_pkcs1_sec_decrypt_variable (size_t *length, uint8_t *message, size_t padded_message_length, const volatile uint8_t *padded_message)
 

Macro Definition Documentation

◆ EQUAL

#define EQUAL (   a,
 
)     ((((uint32_t)(a) ^ (uint32_t)(b)) - 1U) >> 31)

Definition at line 53 of file pkcs1-sec-decrypt.c.

◆ GREATER_OR_EQUAL

#define GREATER_OR_EQUAL (   a,
 
)     (1U - (((uint32_t)(a) - (uint32_t)(b)) >> 31))

Definition at line 55 of file pkcs1-sec-decrypt.c.

◆ NOT_EQUAL

#define NOT_EQUAL (   a,
 
)     ((0U - ((uint32_t)(a) ^ (uint32_t)(b))) >> 31)

Definition at line 51 of file pkcs1-sec-decrypt.c.

Function Documentation

◆ _nettle_pkcs1_sec_decrypt()

int _nettle_pkcs1_sec_decrypt ( size_t  length,
uint8_t *  message,
size_t  padded_message_length,
const volatile uint8_t *  padded_message 
)

Definition at line 59 of file pkcs1-sec-decrypt.c.

References cnd_memcpy, EQUAL, i, and NOT_EQUAL.

◆ _nettle_pkcs1_sec_decrypt_variable()

int _nettle_pkcs1_sec_decrypt_variable ( size_t *  length,
uint8_t *  message,
size_t  padded_message_length,
const volatile uint8_t *  padded_message 
)

Definition at line 88 of file pkcs1-sec-decrypt.c.

References cnd_memcpy, EQUAL, GREATER_OR_EQUAL, i, and NOT_EQUAL.