Questions tagged as ['implementation']

Implementing a cipher or protocol is the process of taking it from its mathematical or algorithmic description and producing a working version, often in computer software or hardware. This tag should be used for any question discussing the various potential considerations and pitfalls of this process, for example padding.
Score: 0
Sam avatar
Homomorphic Encryption Library Supporting Addition, Multiplication & Logical Shift
pk flag

Does anyone know of a C++ homomorphic encryption library that supports addition, multiplication and logical right shift over integers? Some set of instructions that allows the implementation of logical shifts would work as well. The range should be at least sufficient to support signed 32-bit integers and the scheme should support arbitrary depth. I tried using Palisade, but found no way of implementing ...

Score: 2
Laba Sa avatar
Sage code for finding generator matrix of MDS code
in flag
  1. Let $L$ be an $[n,k]$ code. A $k\times n$ matrix $G$ whose rows form a basis for $L$ is called a generator matrix for $L$.

  2. A linear $[n,k,d]$ code with largest possible minimum distance is called maximum distance $d$ separable or MDS code.

I want to find a generator matrix for MDS code using SageMath or in another way, is there any SageMath code to check a matrix is a generator matrix for the MDS ...

Score: 0
Mohamed Waleed avatar
RSA Blind Signatures Secure Implementation
in flag

note: I am not a crpytographer

I want to check if my RSA Blind Signatures Implementation is secure to be used in a production-stage application and I also have some questions which I would be so grateful to be answered.
I did a lot of research in the last few days and came out with this:

Signature Issuing Stage

  1. Get the public key; exponent $e$, modulus $n$
  2. Generate a random number $r$ that is les ...
Score: 0
thoku avatar
Fernet symmetric-key encryption
ua flag

Fernet symmetric-key encryption

To encrypt and provide data — e.g. JSON strings in a database — using Python I'm wondering what is a good approach (package) for symmetric-key encryption.

The Python standard modules are only about hashes and secure random numbers:, so I started with as ...

Score: 0
Patrice avatar
How to test Salsa20/8 Core RFC 7914 implementation with the test vectors?
in flag

I wanted to test the implementation of the Salsa20/8 Core function provided in the RFC 7914, with the test vectors provided, and I do not get the expected output from provided input. I guess that I am not using the input properly, but I am afraid I need help... Here is my code:

#include <stdio.h>

int main() {

  unsigned int in[16];
  unsigned int x[16];
  unsigned int out[16];

  <https:/ ...
Score: 3
LeonMSH avatar
The better algorithm for Modular Exponentiation on secp256k1/r1
us flag

I know Modular Exponentiation ($r = b^e \bmod m$) is important for RSA, and I can find some algorithm that if e is expressed in binary form (for exp: )--in such way for a n-bit long e, one can expect ~1.5n rounds multiply modular operation.

I am working on making a public key recovery methodology for ECC like secp256k1/r1. There is a very efficient implementation in the secp256k1 lib, but that was co ...

Score: 2
user2357 avatar
What can chaos provide to cryptography?
us flag

Chaos-based cryptography is facing a lot of criticism, however, some people argue that it can provide many cryptographic primitives, such as stream ciphers, block ciphers, hash functions, public-key ciphers.

Leaving aside all the defects of the application chaos in cryptography, is not chaos at most is a pseudo-random generator which could be used for stream ciphers (if this even possible)?

Note: I  ...

Score: 0
Ted Brownlow avatar
Are there any implementations of "More Fun With Funky Plaintext Spaces" from the BGV paper?
gb flag

Fully Homomorphic Encryption without Bootstrapping describes considerations for large (exponential in the security parameter) integer plaintext spaces in Section 5.4, "More Fun with Funky Plaintext Spaces". Has anybody implemented these techniques in code?

Score: 0
Are there any Enveloped Merkle-Damgård implementations?
cn flag

I'm implementing "Enveloped Merkle-Damgård" and I would like to verify I undestood notation in papers describing it.

Is there any hash function using "Enveloped Merkle-Damgård" so I can look at implementation in code?

Score: 0
How to extend operations from numbers to larger "objects" in cryptographic implementations?
in flag

I know I'm not supposed to roll my own crypto, but everyone starts somewhere! I'm implementing the PSI-CA protocol defined in Fast and Private Computation of Cardinality of Set Intersection and Union (Figure 1, Page 5), and I have it (more-or-less) working. My biggest issue is that I only have it working for int64_t types, and nothing else. Ultimately I'd like to compare strings or even arbitrary  ...

Score: 0
Wolden avatar
CSPRNG in Javascript?
cn flag

I'm trying to obtain a random, unpredictable quite long number (± 20-25 digits) using Javascript (created by user's client) as fast and light as possible. Is this solution reliable, robust and secure enough?

When the online page is opened, the 13-digit timestamp is stored. A timer determines the number of milliseconds before user clicks on 'OK' (let's assume he got a short text to read or anythi ...

Score: 0
Bob avatar
What's the performance of the HElib and SEAL?
cn flag

HElib contains the CKKS and BGV, SEAL contains the BFV and CKKS, is there some concrete performance data about these two lib?

Score: 1
What are the algorithms used in Facebook's Diem algorithm?
am flag

Facebook plan a new cryptocurrency release called Diem. What algorithms are used? What output size is used for the hash function?

Score: 1
What are the algebraic normal forms for each bit of $z$, where $z = (x \oplus y) \oplus ((x \wedge y) \ll 1)$ (a non-linear operation in NORX)?
de flag

Let $x, y, z$ denote three $n$-bit words such that $$z = (x \oplus y) \oplus ((x \land y) \ll 1).$$

The NORX paper contains the generalized description of the algebraic normal forms for each bit of $x$ given $y$ and $z$: $$\begin{array}{l} x_0 = (z_0 \oplus y_0),\\ x_1 = (z_1 \oplus y_1) \oplus (x_0 \land y_0),\\ \vdots\\ x_i = (z_i \oplus y_i) \oplus (x_{i-1} \land y_{i-1}),\\ \vdots\\ x_{n-1} = (z_{ ...