BN_BLINDING_NEW(3ossl)
π NAME π
okay so this is BN_BLINDING_NEW(3ossl), the OpenSSL page for all the blinding related BIGNUM functions. The whole squad is here: BN_BLINDING_new, BN_BLINDING_free, BN_BLINDING_update, BN_BLINDING_convert, BN_BLINDING_invert, BN_BLINDING_convert_ex, BN_BLINDING_invert_ex, BN_BLINDING_is_current_thread, BN_BLINDING_set_current_thread, BN_BLINDING_lock, BN_BLINDING_unlock, BN_BLINDING_get_flags, BN_BLINDING_set_flags, and BN_BLINDING_create_param. no cap, that's literally the list π
β¨ SYNOPSIS β¨
bestie, here are the receipts β copy these exactly:
#include <openssl/bn.h>
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai,
BIGNUM *mod);
void BN_BLINDING_free(BN_BLINDING *b);
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b,
BN_CTX *ctx);
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
BN_CTX *ctx);
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
int BN_BLINDING_lock(BN_BLINDING *b);
int BN_BLINDING_unlock(BN_BLINDING *b);
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *b);
void BN_BLINDING_set_flags(BN_BLINDING *b, unsigned long flags);
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
int (*bn_mod_exp)(BIGNUM *r,
const BIGNUM *a,
const BIGNUM *p,
const BIGNUM *m,
BN_CTX *ctx,
BN_MONT_CTX *m_ctx),
BN_MONT_CTX *m_ctx);
π¦ DESCRIPTION π¦
okay so here is the tea on every single function, no skips, fr fr:
BN_BLINDING_new()β allocates a newBN_BLINDINGstructure and copies theAandAivalues into the newly createdBN_BLINDINGobject.BN_BLINDING_free()β frees theBN_BLINDINGstructure. IfbisNULL, nothing is done. polite and safe, we love that.BN_BLINDING_update()β updates theBN_BLINDINGparameters by squaring theAandAior, after a specific number of uses and if the necessary parameters are set, by re-creating the blinding parameters.BN_BLINDING_convert_ex()β multipliesnwith the blinding factorA. Ifris notNULL, a copy of the inverse blinding factorAiwill be returned inrβ this is useful if an RSA object is shared among several threads. multi-thread girlies, this one's for you π«ΆBN_BLINDING_invert_ex()β multipliesnwith the inverse blinding factorAi. Ifris notNULLit will be used as the inverse blinding.BN_BLINDING_convert()andBN_BLINDING_invert()β wrapper functions forBN_BLINDING_convert_ex()andBN_BLINDING_invert_ex()withrset toNULL.BN_BLINDING_is_current_thread()β returns whether theBN_BLINDINGstructure is owned by the current thread. This is to help users provide proper locking if needed for multi-threaded use. main character thread energy πBN_BLINDING_set_current_thread()β sets the current thread as the owner of theBN_BLINDINGstructure.BN_BLINDING_lock()β locks theBN_BLINDINGstructure.BN_BLINDING_unlock()β unlocks theBN_BLINDINGstructure.BN_BLINDING_get_flags()β returns theBN_BLINDINGflags. Currently there are two supported flags:BN_BLINDING_NO_UPDATEandBN_BLINDING_NO_RECREATE.BN_BLINDING_NO_UPDATEinhibits the automatic update of theBN_BLINDINGparameters after each use, andBN_BLINDING_NO_RECREATEinhibits the automatic re-creation of theBN_BLINDINGparameters after a fixed number of uses (currently32). In newly allocatedBN_BLINDINGobjects no flags are set.BN_BLINDING_set_flags()β sets theBN_BLINDINGparameters flags.BN_BLINDING_create_param()β creates newBN_BLINDINGparameters using the exponenteand the modulusm.bn_mod_expandm_ctxcan be used to pass special functions for exponentiation (normallyBN_mod_exp_mont()andBN_MONT_CTX). special guest functions, iykyk β¨
π RETURN VALUES π
BN_BLINDING_new()β returns the newly allocatedBN_BLINDINGstructure orNULLin case of an error.BN_BLINDING_update(),BN_BLINDING_convert(),BN_BLINDING_invert(),BN_BLINDING_convert_ex(), andBN_BLINDING_invert_ex()β return1on success and0if an error occurred.BN_BLINDING_is_current_thread()β returns1if the current thread owns theBN_BLINDINGobject,0otherwise.BN_BLINDING_set_current_thread()β doesn't return anything.BN_BLINDING_lock(),BN_BLINDING_unlock()β return1if the operation succeeded or0on error.BN_BLINDING_get_flags()β returns the currently setBN_BLINDINGflags (anunsigned longvalue).BN_BLINDING_create_param()β returns the newly createdBN_BLINDINGparameters orNULLon error.
πΈ HISTORY πΈ
fun lore moment: BN_BLINDING_thread_id() was first introduced in OpenSSL 1.0.0, and it deprecates BN_BLINDING_set_thread_id() and BN_BLINDING_get_thread_id(). the way that history just casually drops that π
π COPYRIGHT π
Copyright 2005-2017 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay bye bestie β this is from OpenSSL 3.5.0, dated 2026-09-25, and the page is BN_BLINDING_NEW(3ossl) π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms