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 ...

learn more… | top users | synonyms

3
votes
2answers
839 views

Additive ElGamal cryptosystem using a finite field

I'm trying to implement a modified version of the ElGamal cryptosystem as specified by Cramer et al. in "A secure and optimally efficient multi-authority election scheme", which possesses additive ...
6
votes
2answers
81 views

What does the TLS 1.2 client finished message contain?

I am implementing TLS 1.2 and I'm stuck on the client finished message. My question is: what is the size and structure of a clients finished message in TLS 1.2 when using the ...
14
votes
3answers
2k views

Webcam random number generator

I have a question about random number generators. I have read from a real random number generator, based on a webcam ("randcam"). My problem is, that I do not really understand how the generation of ...
3
votes
4answers
401 views

Cryptography and FPGA

I see a lot of papers about FPGA implementations. For what kind of "concrete" application should we implement cryptographic algorithms on FPGA ? Which secured application require such a huge data ...
3
votes
2answers
193 views

HW acceleration for Camellia cipher (x86_64/AES-NI/AVX2)

Modern processors support hardware acceleration for various crypto functions such as AES directly, or general vector operations which can be used in crypto ...
4
votes
1answer
83 views

How to convert AES to a PRNG in order to run NIST Statistical Test Suite?

I want to run statistical tests on my implementation of AES. How should I convert it into a PRNG? Is there a standard way to go about doing this? I could not find much information about this although ...
4
votes
1answer
168 views

Full encryption of IDs, partial decryption with customer specific key

I am looking for a "partial" encryption/decryption algorithm. Let's say I am encrypting the following List of IDs (long values) $[1,2,3,4]$ (with a secret key) to an encrypted string $e$, I would ...
2
votes
2answers
138 views

System parameters in identity-based encryption

In IBE schemes, the system parameters are $(q, \mathbb{G}, F, \hat{e}, P, Q, T, H_1)$. I don't know $\hat{e}$. For example, in type A pairing… ...
4
votes
2answers
98 views

Are there simpler FHE methods than Craig Gentry's original paper?

Craig Gentry's 2010 paper on FHE is very cool, and I'm planning on implementing a basic proof of concept FHE. I was wondering though, are there any simpler methods that have been discovered since ...
-1
votes
0answers
24 views

Pairing on BN curves, GMP code

Is it possible to write a small implementation of tate pairing using BN curves using GMP. It does not need to be efficient. I just want to understand the steps. Thank you.
6
votes
2answers
157 views

What may be causing conflicts in Whirlpool implementation versions?

I see by layman articles (e.g. at Wikipedia) that the Whirlpool hash function has seemingly three current versions. That is to say, they are referenced as ...
0
votes
0answers
24 views

Composing hash functions

Suppose there is a cryptographic hash function $H : \{0,1\}^* \to \mathbb G$. Now, we want to define a hash function $H' : \{0,1\}^* \to \mathbb G \times \mathbb G $. My first idea is to define $H'$ ...
0
votes
0answers
30 views

Key size limitations due to software compatibility?

At the moment, much popular encryption-based software routinely handles up to 4096 bit keys and standard usage is broadly migrating from 1024 to 2048 bit keys. Hashes widely used are MD5/SHA1/SHA256 ...
2
votes
1answer
71 views

Trusted Third Party Cryptanalysis Labs?

There's no doubt that third party cryptanalysis is an essential part of the crypto ecosystem. It's how we know that there's some degree of practical "goodness" to a new algorithm or protocol. Unlike ...
2
votes
0answers
148 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 ...
2
votes
1answer
183 views

Standard serialization format for libsodium-based messages

Does anyone know of a standardized serialization format which can be (or already is) widely used for encrypted messages? For a variety of reasons (mostly complexity, age and poor support across a lot ...
9
votes
1answer
171 views

On Linux, does /dev/random unblocking imply that /dev/urandom is seeded?

Linux has the familiar problem that /dev/random blocks too much (insisting on being information-theoretically secure), while /dev/urandom doesn't block enough (it will return data before it's been ...
0
votes
2answers
72 views

Which encryption is recommended for own messenger [closed]

I wrote my own messaging-app and now I would like to encrypt the data transfer between my client (app) and my server. What kind of encryption is easy to implement and can be recommended? I am very ...
5
votes
1answer
118 views

Which attacks are possible against raw/textbook elliptic curve?

A quick question, we know that raw RSA is a no go. To solve this we have different PKCS standards forcing structure on the input messages. For EC the story is something else. For signatures we have ...
2
votes
2answers
93 views

Implementing RSA with small integers in CUDA

I have found some researches dedicated for speeding-up RSA calculations using CUDA. But I am wondering how they do that, given that the biggest unsigned int that could be declared in CUDA is 64 bit. ...
1
vote
1answer
68 views

Are developers expected to implement Diffie-Hellman key exchange themselves?

I noticed that the GO standard library has some really nice functions for performing AES encryption / decryption in various modes. However, I couldn't (yet) find anything for Diffie-Hellman key ...
1
vote
2answers
720 views

Use cases and implementations of RSA CRT

I discovered the chinese remainder theorem (CRT) version of RSA cryptosystem which is used in many crypto libraries (OpenSSL, Java...). The use of this theorem improves the speed of decryption so, ...
6
votes
1answer
615 views

Does omitting the first two lines of RC4's pseudo-random generation algorithm weaken the cipher?

A particular educational software program published by a U.S. government agency uses a variant of RC4 to obfuscate its data files (see Stack Overflow question). The variant of RC4 in question is ...
1
vote
1answer
78 views

Is it okay for a non-cryptographer to submit crypto code to an open source probject? [closed]

I am not a cryptographer, nor do I claim to be. However, at times I have wanted to contribute to open source cryptography projects such as libsodium. The maintainer of libsodium is a cryptographer, ...
10
votes
2answers
912 views

How does hash speed vary based on string length?

Surprisingly I have not been able to find an answer to this question on Google. If I have a function that is based on any of the popular hashing algorithms used for password generation, by what ...
2
votes
1answer
125 views

Questions about a SHA3 cipher stream encryption scheme

I have written an encryption implementation using a hash as a cipherstream for demonstration purposes. I know it is slower than more sensible options such as AES but I am interested in several things, ...
1
vote
1answer
114 views

128 Bit AES Issue

I'm trying to use the 128bit TI_aes implementation on my 16bit microcontroller and I'm having the weirdest issue. Every input where two bytes within a word are identical two nibbles within a byte ...
0
votes
0answers
43 views

What are the pre-requisites I need to be able to code Salsa20 in C#?

I've taken a basic course in Cryptography and we've learnt various algorithms and their usage. I've implemented RC4 and Triple DES in C# with ASP.NET. For a project that I am a part of, I need to ...
10
votes
3answers
2k views

McEliece Cryptosystem Implementations

Are there any current implementations (language irrelevant) of the McEliece Cryptosystem? I have been hunting around all day, and yet, have only found a few mathematical equations pertaining to the ...
1
vote
1answer
99 views

Why does image size increase after steganography?

I am working on a steganography technique. Sometimes I need to send my steganographed images online to my friends but in the process the image gets compressed destroying all the data. I found ways to ...
3
votes
1answer
47 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: ...
1
vote
2answers
120 views

How can comparision like (>=,==) be done using homomorphic encryption?

Since we know that Homomorphic encryption allow computation on encrypted data. Let two n-bit integers $(x,y)$ are encrypted using some LWE public key cryptography. For example - if $x'= HEnc(x,pk)$ ...
0
votes
0answers
24 views

Implementing cryptosystems with various programming langauges

I know that most cryptosystems are currently implemented in C/C++. Has there been any effort to implement cryptosystems in programming languages such as Agda where proofs can be written about ...
2
votes
0answers
41 views

Example of Projective Coordinates

Given the affine form of coordinates $(x,y)$ such as $(5,3)$, if I want to convert $(5,3)$ to projective coordinates $(x,y,z)$, should the form of point be $(5,3,1)$? It is triplet not a point, right? ...
1
vote
0answers
64 views

Convert projective to affine coordinates in ECC? [closed]

I am working with my project. I use projective coordinates but when I convert to affine coordinates, I can't get it. Can anyone help me? Projective Coordinates $(X,Y,Z)$ to Affine Coordinates ...
1
vote
1answer
72 views

Non-numeric Diffie-Hellman?

It may seem that this is a programming question, but I just need advice on the cryptography side of the question. I want to implement the Diffie-Hellman key exchange algorithm on iOS (since no free ...
5
votes
1answer
953 views

Should the secret key of Shamir's secret-sharing algorithm be interpreted byte by byte?

Should the secret message of Shamir's secret-sharing algorithm be interpreted and processed byte by byte? Interpreting it byte by byte makes it easier to process, but in case one of the shareholders ...
5
votes
1answer
73 views

Choice of the one-way function (OWF) for Lamport signatures

I am studying the Lamport signature scheme, and I found that in many sources (eg: Hash-based Digital Signature Schemes) the input and output bitstring of the OWF and the message digest have the same ...
1
vote
1answer
114 views

Problem in understanding Blakley's Secret Sharing Scheme

I need to implement Blakley's Secret Sharing Scheme. I have read below mentioned two research papers but still unable to understand how to implement it. Safeguarding cryptographic keys Two Matrices ...
17
votes
1answer
5k views

What is a white-box implementation of a cryptographic algorithm?

What is a white-box implementation? Does a white-box implementation have specific properties?
3
votes
1answer
65 views

Is it secure to use hexadecimal data for IV instead of raw binary?

Is it safe and secure to use a function like bin2hex (which converts binary data to hexadecimal) on the binary output of functions like ...
4
votes
1answer
57 views

What is the difference between MACTripleDES and TripleDES?

I was asked to encrypt/decrypt a string using MACTripleDES. Is there any difference between MACTripleDES and TripleDES? If, where exactly is the difference between both?
4
votes
1answer
143 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 ...
0
votes
1answer
27 views

Would buffering socket send resist timing attacks

I have been reading and thinking about timing attacks on cryptographic systems. The answer to this question mentions the following: "The way to defend against timing attacks is to make sure the time ...
1
vote
1answer
82 views

What libraries do people use to implement and evaluate cryptography protocols?

I want to implement this credential system: “Anonymous Credentials Light” (PDF). The implementation would involve some zero-knowledge proof and some exponentiation. For some basic group computations ...
4
votes
4answers
552 views

Are specially designed fonts sometimes used in cryptography?

As a font designer, I was thinking that it would be very easy to design a special font that could either jumble characters of a language (or of a code) or simply (with the features offered by the OTF ...
3
votes
2answers
104 views

Implementation of ECC over binary field

I am supposed to implement ECC over binary field (in C++) for equations of the type - $y^2 + xy = x^3 + ax + b$, as my project. I wish to include the following features : The user will enter a prime ...
3
votes
0answers
35 views

Seeking an implementation of the Satoh algorithm for elliptical curve point counting

I would be very grateful if someone has an implementation of the Satoh algorithm (Fast Elliptic Curve Point Counting). Can someone point me to practical algorithm implementations or provide some ...
1
vote
0answers
33 views

How to apply linear cryptanalysis to PRESENT?

Can someone help me implement linear cryptanalysis of the PRESENT block cipher? How should I start with 64 bits of plaintext and 80 bits of key?
1
vote
1answer
56 views

What is a good algorithm to scramble data in a 2-D grid

I want to know if there exists an algorithm i can use where the input is a string of data and the output is a scrambled version of the same but in a 2 D array ie given something like: |1 2 3 4 5 6 ...