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
1
vote
1answer
249 views

Costs of operations in elliptic curves explanation

I'm trying to understand the cost of operation in elliptic curve (only Weierstrass curve for simplicity) from Wikipedia and there seems to be lack of online information/papers regarding this. I ...
17
votes
1answer
2k views

Edwards / Montgomery ECC with Weierstrass Implementation?

So let's assume I want to perform Ed448 or Ed25519 digital signatures or want to perform a DH key-exchange. Assume further that those curves (Curve448 or Curve25519) are required. But the problem is, ...
1
vote
0answers
171 views

Implementing AES algorithm using Arduino [closed]

I am using an Arduino board to implement the AES Algorithm: I am having a large data of length approximately 500 bytes. I did all the basic stuff in implementing this AES Algorithm. I am getting ...
5
votes
3answers
844 views

How do you make Fermat's primality test go fast?

This small Lisp-function implements Fermat's primality test in a very simple way and it is very slow at $n >= 10^6$ because we reach into bignum territory. ...
3
votes
0answers
270 views

How to modify the Socialist Millionaire Protocol to be symmetric.

In the Socialist Millionaire Protocol, the roles of Alice and Bob are almost symmetric. By this I mean they do almost the same thing, until the very last step. In the final step, both parties check a ...
1
vote
1answer
116 views

Is using Euler's Totient/phi in Tonelli-Shanks (used to recover EC coordinate) safe?

I'm implementing an algorithm in order to recover the $y$ co-ordinate from $x$ in order to construct a co-ordinate pair that satisfies secp256k1's elliptic curve equation, which is: $y^2 = x^3 + 7 \...
1
vote
1answer
494 views

Speeding up the Denning-Sacco protocol?

I have started to study cryptography and I have come across Denning-Sacco protocol. I understand multiplicity vulnerability. My question is why Denning-Sacco protocol choose to generate key on ...
2
votes
1answer
2k views

Z*p Generator (Cyclic Group) in java

I am trying to implement ElGamal in java without using the in-built libraries. The problem occurs when I am trying to find the generators of the number(in this case 11). Everything works perfectly ...
1
vote
1answer
143 views

Why the data length is shifted 3-bit in MD4 Java implementation? [closed]

In RFC 1320, It is stated that "A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous step. In the unlikely event that b ...
6
votes
1answer
2k views

Is the use of AES in LoRaWAN correct?

I'm reading about LoRaWAN (specification). This network protocol has a particular way to encrypt data, detailed in the part 4.3.3.1. Here is a recap of how the encryption work, as I understood it. ...
6
votes
2answers
825 views

Any real world implementation using message recovery?

During my master thesis I came across RSA-PSS-R which is in my opinion a quite elegant way of saving bandwidth and space using digital signature. But I didn't find any information about any real world ...
3
votes
1answer
586 views

Can authenticated encryption reduce bandwidth overhead of per-packet encryption?

I know that authenticated encryption modes of operation like GCM offer certain security advantages, as well as increased performance. (On my laptop with AES-NI, the benchmark performance of ...
3
votes
2answers
613 views

Can I simulate iterated AES-ECB with other block cipher modes?

I am trying to write some code using the Web Crypto API (http://www.w3.org/TR/WebCryptoAPI/#algorithm-overview) which provides only some of the block cipher modes for AES, intentionally excluding AES-...
5
votes
1answer
485 views

How does mutlivariate crypto schemes work?

I have been studying multivariate cryptography for post-quantum cryptography lately, but I have a hard time in understanding how these signature schemes work. As long as I see there there is UOV ...
2
votes
1answer
132 views

Secure instant messaging protocol and implementation for an anonymous end-to-end chat?

all is said in the title but I will go further. First question : I searched here and I found Tox to be the most powerful protocol. It uses Curve25519, XSalsa20 and Poly1305. They seem to be good ...
6
votes
4answers
1k views

Subverting the key generation step in RSA public key cryptography

I am interested in the ways an RSA key generation implementation can or cannot be subverted so that the subverter has an advantage, but the owner of the key, and the people who interact with the owner,...
6
votes
1answer
2k views

If you had to implement the BGN Cryptosystem, how would you do it?

If you had to implement BGN, how would you do it? I'm looking for an implementation of the public-key cryptosystem due to Boneh, Goh, and Nissim (aka BGN), or at least some suggestions on ...
2
votes
2answers
2k views

Parsing of X.509 certificates

I'm working on a firmware for a platform with limited resources with C as programming language. There are a set of cryptographic primitives to be implemented, including AES, GCM/GMAC, ECDSA, ECDH. ...
4
votes
2answers
125 views

What information should I send along with an AES ciphertext and is there any standard to do that?

While using some crypto implementations I got to see that many times a comment is added to the ciphertext. For example: ...
0
votes
1answer
1k views

Crypto++ and SHA3 [closed]

I'm using c++ with the crypto++ library, which includes the keccak algorithm for hashing. I could find instances with specific length of the hashvalues. There are 224, 256, 384 and 512 bits. But I ...
5
votes
3answers
129 views

Adding a number congruent to $0$ to ensure that the mod operation takes a constant number of instruction cycles

I've been looking at the s2n implementation of HMAC, and in the `update' function (line 175), it says ...
2
votes
1answer
32 views

Securely testing the presence of an item in a list without exposing the list

Not even sure what terms would describe what I'm looking for, but the general idea: Given a list of strings of a finite length, determine whether or not a test string belongs to the list. Then, ...
5
votes
1answer
1k views

Security implications of public nonce

I'm planning to use the crypto_box() functions of Nacl (or, alternatively, the crypto_box_easy() functions of libsodium) to ...
-1
votes
1answer
698 views

Python Code review of AES implementation

My long term goal is to make a tool similar to boxcryptor but first I need to learn how to program and how to properly implement AES. So far I've been using Python for simplicity but I plan to use a ...
0
votes
2answers
1k views

Rabin cryptosystem decryption when p=q

I'm currently trying to implement the Rabin Cryptosystem when I realized something when gave p and q the same value: So my values are as follows: Original message = 20 p=11 q=11 Encrypted message ...
7
votes
2answers
5k views

Difference between Hardware implemented algorithm and software implemented one?

In the articles about cryptography I see the words Hardware implemented and Software implemented. I'm curious to know what is the difference between them? In the other words, even in the computer ...
2
votes
1answer
301 views

Memory during crypto computation

I'm implementing a cryptographic primitive and I have a question about the memory model. The function (simplified) looks something like this: ...
2
votes
1answer
122 views

Small roots of bivariate modular linear equation?

Say I have a simple affine relationship between two variables $x$ and $y$ in a field $\mathbb{F}_p$ ($p$ is a large security parameter): $ax + by + c = 0$ What algorithm would be appropriate to find ...
2
votes
1answer
1k views

How do you implement a cipher as one lookup table?

I am reading up on whitebox cryptography and have trouble understanding how are ciphers implemented as one lookup table? Assuming my plaintext is just 4 bits so the size of my lookup table should be $...
2
votes
1answer
152 views

Security model scalar multiplication in NaCl

I'm having trouble understanding what the “security model” for “scalar multiplication” in NaCl is. Security model crypto_scalarmult is designed to be strong ...
1
vote
1answer
171 views

Why am I getting a wrong output when implementing Feige-Fiat-Shamir ID protocol?

I am trying to implement the Feige-Fiat-Shamir identification protocol. I've read another posting here on this site and I tried to adapt - however the end results always fail to match. Maybe because ...
6
votes
2answers
277 views

Are any of the practical implementations of ORAM being used in a real world system?

The concept of Oblivious RAM (ORAM) was first introduced by Oded Goldreich and Rafail Ostrovsky in 1996. However, in the past 5-10 years there has been a surge in the amount of research that looks ...
1
vote
0answers
63 views

Freely available softwares for simulating/implementing MPC protocols [closed]

I have been designing multiparty computation (MPC) protocols for functions that interest me. Although theoretically I am able to deduce the asymptotic complexity of the protocol, I wish to know as to ...
5
votes
1answer
151 views

Ideal way to profile/performance-measure cipher implementations

I have implemented a bit-sliced version of two ciphers (Gibbon-120 and Hanuman-120, both part of the Primates family of ciphers: http://primates.ae/wp-content/uploads/primatesv1.02.pdf ) I now want ...
12
votes
1answer
1k views

Is it possible to test implementation for side-channel attacks?

When it comes to implementing cryptographic algorithms, there seems to be a big focus on the difficulty of doing so without introducing the potential for side channel attacks and the knowledge ...
41
votes
5answers
8k views

In RSA, how does the CPU deal with this huge modulus (8192 bits)?

Whilst I understand how the RSA algorithm works, I don't understand how the CPU operates when it needs to use the mod function with a huge number $n$, for example. ...
9
votes
2answers
5k views

On-the-fly computation of AES Round Keys for decryption?

The usual implementation of AES first computes all the Round Keys sequentially starting from the key, and stores them in RAM for later uses. However, when enciphering a single block with a key that ...
1
vote
1answer
107 views

Why Rabin fingerprints assumes data is prefixed with a “1” bit?

(I know that a Rabin fingerprint is not a cryptographic hash, sorry in advance if my question is considered out of topic) In the paper Some applications of Rabin's fingerprinting method, it is ...
1
vote
1answer
353 views

Audio Encryption in Voip SIP [closed]

I have some project encrypion real-time. I want use Voip SIP to implement the stream cipher. What I have done so far : Simple app android Voip SIP https://github.com/android/platform_development/...
3
votes
1answer
145 views

El Gamal special construction

The algorithm: I have to determine if the following algorithm is secure: $p,q \in \mathbb{P}$ and $N = p \cdot q$ $e \in [2, N - 1]$ such that $\gcd(e, N) = 1$ $r_1, r_2$ are random numbers in ...
1
vote
0answers
147 views

Issue Factorization Quadratic Sieve

Good evening, I'm about to write my own quadratic sieve implementation in C using GMP library for large numbers. I'm facing an issue while attempting to do the last factorization step for the number: ...
21
votes
3answers
5k views

Known methods for constant time (table-free) AES implementation using 'standard' operations?

There are several known methods for implementing AES in constant time using SIMD operations, mostly based around fast byte shuffling (for instance Hamburg and Kasper/Schwabe). Are there any similar ...
1
vote
1answer
764 views

Fully Homomorphic Encryption over the Integers with Shorter Public Keys [closed]

I want to implement Homomorphic scheme from the paper Fully Homomorphic Encryption over the Integers with Shorter Public Keys. I successfully implemented key generation by taking $\lambda = 2, \beta =...
12
votes
2answers
1k views

Are there any signature schemes for underpowered devices (8-bit microcontroller)?

I am currently researching into a small scale home automation system, aiming for cost. The system architecture is basically one master and several slaves which are connected in parallel. Recently i'...
19
votes
3answers
10k views

Cryptanalysis to reverse engineer a hash?

I understand this may not be the best place to ask a question like this, but I believe that this community may be the best/only place I can ask such a question. I have inputs and outputs from an in-...
2
votes
0answers
3k views

How to generate an RSASSA-PSS signature with MGF1-SHA256? [closed]

As part of rooting a device, I need to generate a 256-byte RSASSA-PSS signature using SHA256 as the hash and MGF1-SHA256 as the mask function, for an update file I created. I can choose any 32-byte ...
6
votes
2answers
658 views

How to test implementation of primality tests like Miller–Rabin?

The Miller-Rabin primality test is an algorithm for checking if number is a prime. What would be best way to test implementation of such algorithm (or any primality test in general)?
5
votes
1answer
164 views

What security checks do I need for SRP-6a?

I'm implementing an SRP-6a login system. What security checks do I need to do? Note that the modulus is sent to the client at algorithm startup. Here is the list I have so far. I'm using the ...
4
votes
2answers
1k views

Verilog simulation & synthesis of Diffie-Hellman key exchange

Is there any freely available verilog implementaion of Diffie-Hellman key exchange? I couldn't find anything using google. So, assuming its not there I started implementing on my own. The code is ...
4
votes
1answer
698 views

How can bit slicing be constant time, when Mix Columns is in the cipher

I'm reading about bit-slicing techniques, and one thing about it caught my mind. The strength with bit sliced implementations are (apart from that they are fast) that they are running in constant ...

1
3 4
5
6 7
9