Questions tagged [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.

Filter by
Sorted by
Tagged with
0
votes
0answers
53 views

Homomorphic Encryption Library Supporting Addition, Multiplication & Logical Shift

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 ...
2
votes
1answer
60 views

Sage code for finding generator matrix of MDS code

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$. A linear $[n,k,d]$ code with largest possible minimum distance is called ...
0
votes
1answer
37 views

RSA Blind Signatures Secure Implementation

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 ...
0
votes
1answer
60 views

Fernet symmetric-key encryption

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 ...
0
votes
1answer
25 views

How to test Salsa20/8 Core RFC 7914 implementation with the test vectors?

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 ...
3
votes
1answer
63 views

The better algorithm for Modular Exponentiation on secp256k1/r1

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 ~...
2
votes
4answers
183 views

What can chaos provide to cryptography?

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 ...
0
votes
0answers
26 views

Are there any implementations of "More Fun With Funky Plaintext Spaces" from the BGV paper?

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 ...
0
votes
0answers
28 views

Are there any Enveloped Merkle-Damgård implementations?

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 ...
0
votes
1answer
60 views

How to extend operations from numbers to larger "objects" in cryptographic implementations?

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 (...
0
votes
2answers
110 views

CSPRNG in Javascript?

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 ...
0
votes
0answers
53 views

What's the performance of the HElib and SEAL?

HElib contains the CKKS and BGV, SEAL contains the BFV and CKKS, is there some concrete performance data about these two lib?
1
vote
0answers
68 views

NTRU cryptosystem on complex numbers

Background I am interested in lattice-based cryptography. Recently I got familiar with the NTRU cryptosystem and found out that it can be extended onto hypercomplex numbers, like Quaternions (QTRU) or ...
1
vote
1answer
171 views

What are the algorithms used in Facebook's Diem algorithm?

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

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)?

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$...
2
votes
0answers
26 views

Does anybody have test vectors for the LBlock block cipher?

LBlock is a lightweight block cipher with 64-80 bits block-key size, designed by a group of Chinese scholars. Does anybody have LBlock test vectors? I am looking for test vectors, which contain the ...
0
votes
0answers
22 views

Want to implement a cipher efficiently on Hardware with verilog, is there any standard resources to start?

I want to implement a new block cipher on hardware. The cipher has a look-up table and the rounds are not self-similar. So, the code size, as well as the chip area, is expected to be larger. I just ...
1
vote
0answers
47 views

Multiplication in Tower Field $GF(2^4)^2$

I'm currently reading an article which deals with "Squeezing Polynomial Masking into Tower Fields " for performing an efficient multiplication of elements in $GF(2^8)$. Thereby it is ...
0
votes
1answer
76 views

How does this generate a permutation?

In the process of trying to answer this question, I ended up getting stuck. I found a paper which seems to solve their issue: its authors define a process which yields a pseudorandom permutation ...
3
votes
0answers
81 views

Which parts of CRYSTALS-Kyber and CRYSTALS-Dilithium are compatible?

The papers CRYSTALS-Kyber and CRYSTALS-Dilithium both have been written by quite different authors. It seems that at least the key generation is very different from each other. CRYSTALS mainly seems ...
2
votes
1answer
65 views

Is a Test Vector feature a Security Hole?

I have a system where a block cipher key (likely AES) is entered via a 'command line' over a serial console, probably as hex. The system has no 'print key' feature, so the key is hopefully 'ingest ...
4
votes
2answers
328 views

Is FFT for power-of-two cyclotomic rings possible if q is not 1 modulo 2n?

For RLWE (Ring Learning With Errors) scheme, we use $R_{q} = \mathbb{Z}_{q}[x]/(x^{n} +1) = \mathbb{Z}_{q}[x]/(\Phi_{2n}(x))$ where $n = 2^{d}$ for some $d$. Since there exists $2n$-th root of unity ...
7
votes
1answer
234 views

Expandable hash function

I have been studying a cryptosystem using Mersenne primes. More specifically, this paper. I have implemented this cryptosystem in Python, but I am missing the key encapsulation system. On page 12, ...
0
votes
1answer
59 views

Do I need to implement multi precision arithmetic operations?

I want to implement Elliptic Curves arithmetics (for edu purpose and better understanding) for special NIST primes: point addition, exponentiation, etc.. all operations needed for EC encryption/...
0
votes
0answers
69 views

Where to get AES GCM NIST-like test cases

I'm implementing AES GCM 256 bit at the moment. Now I'm finished with copying the content of the standard as a program and now have to make it actually work. With the test cases in the official NIST ...
9
votes
3answers
2k views

Benefits of functional programming languages

So far I mostly saw Python (because of simplicity) and C (because of efficiency) for cryptographic programming. But there is a different kind of programming languages called functional programming ...
0
votes
2answers
64 views

How to verify most appropriate cleartext?

So basically I was implementing a decryption tool (just for fun) and the first encryption logic I decided to implement was Caesar Cipher. So if I have the input as ...
1
vote
0answers
84 views

Test vectors for FF1/FF3-1

I'm working on a C implementation of the FF1 and FF3-1 format-preserving encryption algorithms, here. For FF1, NIST provides test vectors, here; however, none of the test vectors is crafted such that <...
1
vote
1answer
42 views

EdDSA point encoding difference between documentation and implementation

The RFC 8032 describes the point encoding like this : A curve point (x,y), with coordinates in the range 0 <= x,y < p, is coded as follows. First, encode the y-coordinate as a little-endian ...
1
vote
0answers
79 views

Security of an ECDSA Adaptor Signature Implementation

I'm currently working on an implementation of ECDSA Adaptor Signatures, and part of the signature scheme calls for a NIZK proof to verify knowledge of exponent over two public keys that share a ...
2
votes
0answers
71 views

Depth of $\operatorname{SHA-256}$ implementation by fan-in $2$ and fan-out $1$ Boolean circuits?

A fan-in $2$ and fan-out $1$ Boolean circuit is a circuit consisting of $\operatorname{AND}$, $\operatorname{OR}$ and $\operatorname{NOT}$ gates where number of inputs to $\operatorname{AND}$ and $\...
0
votes
2answers
83 views

AES Implementation for Image Encryption

I've been delving into cryptography for fun and trying to implement a visualization for AES using image encryption. So far, represented each pixel's RGB values as hexadecimal numbers, then split it ...
0
votes
1answer
66 views

Software implementation of symmetric and asymmetric bilinear pairings

I have recently read a paper about pairings, which only implemented asymmetric bilinear pairings and it mentiond that $\eta_{T}$ pairing is the most efficient algorithm for symmetric pairings. I ...
1
vote
1answer
89 views

Has Burdges and De Feo's concept of Delayed Encryption ever been implemented?

In mid 2020 Jeffrey Burdges and Luca De Feo published a paper proposing a trapdoor-less time-lock puzzle called Delay Encryption. Has a prototype of this ever been made?
3
votes
1answer
135 views

How to ensure that a cryptographic implementation is reasonably sound/robust?

I know from the bottom of my heart how bad the idea of custom-crypto is. I absolutely concur with the recommendation that it should only be done by professionals who specialize in implementing crypto ...
2
votes
0answers
69 views

Is this "AND" implementation safe against side channel attacks?

I found out that the following is a working implementation of calculating an AND function between XOR masked shares, implementation at Github. It works by calculating parities, whose terms cancel each ...
0
votes
1answer
57 views

Can Hash Functions take fixed-size input?

I‘ve argued for quite some time with a friend about wether or not this C# method can be qualified as a Hash Function. ...
5
votes
2answers
320 views

Recommendation of lightweight RNG for Miller-Rabin primality test

Miller-Rabin tests the compositeness of candidate numbers (hence, input $x$) that's often used as a primality test. The M-R test requires different random numbers for accuracy and confidence in the ...
2
votes
2answers
150 views

How to handle modular arithmetic with regard to two's-complement negative numbers?

The reason for asking, is that this occurs in real life with CRT calculation of RSA decryption/signing. In CRT RSA, there's the need to calculate subtraction, and it's known negative numbers could ...
0
votes
1answer
64 views

Creating SHA256 constant values on the fly without memory usuage

Is it possible to create the constants used in SHA256 on the fly? Meaning I dont have to reserve 64 32-bit words of space? It would result in a slower implementation, but at the profit of using less ...
1
vote
0answers
29 views

For most applications of CMS, does the size of the payloads ever exceed that of a 32-bit integer?

For my hobby cryptography project, I'm planning to implement some helper functions that parses a subset of ASN.1 BER encoding without using a ASN.1 compiler. For this purpose, I'd like to use 32-bit ...
2
votes
4answers
291 views

Proof of number of logins in last N days without saving login times

Let's say we have an user Bob. User Bob logs in into our web application every so often. We are a website that tries to save as little information about our users, however we'd like to know which ...
1
vote
1answer
167 views

How to map output of hash algorithm to a finite field

I would like to know an algorithm hash to a finite field. I have an $l$ bit prime number $q$. I want setup a hash function $H: \{0,1\}^* \to \mathbb F_q$ but I do not know how I can do it. I use a ...
0
votes
0answers
81 views

Is there an Elgamal implementation in javascript?

Does anyone know a good, well known implementation of ElGamal encryption and decryption in JavaScript? I was told that Stanford Javascript Crypto Library https://github.com/bitwiseshiftleft/sjcl/ ...
0
votes
0answers
16 views

CP-ABE (partially hidden access structure)

Anyone aware of the implementation of paper "Lai, Junzuo, Robert H. Deng, and Yingjiu Li. 'Expressive CP-ABE with partially hidden access structures.' 2012" specially in python or Charm ...
1
vote
1answer
120 views

Securing communication between limited embedded systems

I am currently trying to harden communication over a limited physical communication channel on an embedded system. The Scenario I think the system is rather typical for small embedded applications: ...
1
vote
1answer
125 views

Which crytographic libraries to use for Elliptic Curve Cryptography and Bilinear Pairing?

I'm currently trying to implement a solution for Vehicular ad hoc networks based on cryptography. I choose to use python to implement the solution, but I don't know which libraries I have to use to ...
4
votes
4answers
2k views

How was AES Encryption cracked on my app?

I built an app that used AES encryption with 16 characters Key and IV. It seems it could easily be hacked, as someone did it in a day. I feel that I made a few mistakes Used key & IV which was ...
10
votes
2answers
884 views

What is a "constant time" work around when dealing with the point at infinity for prime curves?

I've been working for some time, on designing a constant time solution for dealing with the "point at infinity" for prime curves. So, far I'm using the Standard Projective Coordinates for ...
2
votes
0answers
30 views

Minimal implementation of GPS identification algorithm from NESSIE project?

I'm studying GPS, asymmetric identification scheme from the NESSIE project. I found a bunch of helpful information about it in the original submission, they even mention minimal implementation ...

1
2 3 4 5
10