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 ...
1
vote
1answer
86 views
Polynomial multiplication and division in 2^128
I want to multiply and divide polynomials, and implement the extended Euclidean
algorithm for polynomial greatest common divisors, over a Galois Field of size $2^{128}$. Moreover, I want to use the ...
0
votes
1answer
59 views
Encrypting a broadcast channel
We're building a data service that is expected to go out through a single "fat pipe" channel. The design requirement says that the data in the channel must be protected by authentication and ...
0
votes
2answers
207 views
Custom crypto library in C
I will be making (in the near future) an app that will contain some pretty heavy crypto. As it is possible that my app will be ported to different devices (initially it will be iOs only, but Mac, ...
0
votes
3answers
167 views
Implementing secret reconstruction in Shamir's Secret Sharing
I am trying to implement Shamir's secret sharing in C++.
I have got the generation of shares working.
However, I am very confused with the reconstruction of shares. I get the part on how three users ...
1
vote
1answer
67 views
How to compare two datasets „anonymously”?
Ok, I hope this question makes some sense because I am not so sure how to word it any differently… Imagine the following situation:
There are 10 defined colors (blue, orange, yellow etc.)
There are ...
4
votes
3answers
223 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 ...
4
votes
2answers
174 views
Signature schemes for underpowered devices (8bit 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 ...
1
vote
2answers
135 views
Zero-Knowledge Challenge-Responce Protocol
Good day to everyone.
I am trying to implement an e voting system (just for reference -it is not important though-it is described at the Internet Voting Protocol Based on Improved Implicit Security ...
2
votes
1answer
124 views
What should I be aware of when implementing algorithms myself?
I plan to build my own crypto library. The project will be primarily for me to learn (and if useful for no other purpose, that is fine). In the past I have implemented a few hashes, and AES quite a ...
4
votes
5answers
461 views
Software implementation of a commutative cipher?
I've got an application (detailed below) that calls for the use of a cipher that is commutative. I've been doing some googling & reading, and there are two algorithms that seem to get mentioned ...
0
votes
1answer
80 views
Trapdoor implementation
Please refer to this secure index paper. On page#6, a trapdoor is defined as
...
0
votes
0answers
32 views
Security of .net AES implementation and security of a hash MAC
Hello I wanted to ask if there is any review about the security of the AES implementation of the .net Framework?
I found nothing concrete to that question, searching the Internet.
And, but this is a ...
4
votes
2answers
317 views
Is this a correctly formatted PGP session key packet?
RFC 4880 may be full of information, but it can be incredibly vague at times, so im looking for someone who actually knows the answer to this.
Given this public key:
...
0
votes
0answers
30 views
How to create a public-key certificate for RSA Web of trust?
How to create a public-key certificate for RSA Web of trust?
I have (for exemple) two public / private key pair (obviously).
They all need to sign each other certificate.
How to create the ...
1
vote
1answer
57 views
What is the most secure way to let Alice “input” her private key, transfer it to the server and decrypt the message?
What is the most secure way to let Alice "input" her private key, transfer it to the server and decrypt the message? (Then destroy the private key on the server)
Every connection is using SSL.
...
1
vote
2answers
240 views
Where i can find an AES implementation in python?
Where i can find a "reviewed" version of AES implementation in python. Not an API like PyCrypto whereby you can call AES algorithms in a single line.
1
vote
1answer
143 views
What does modular inversion mean?
I'm trying to implement an e-voting algorithm, which is described at the paper "Internet Voting Protocol Based on Improved Implicit Security" by Abhishek Parakh & Subhash Kak.
At the Example 1 ...
4
votes
1answer
81 views
Two way encryption with random IV
I'm attempting to encrypt some information into our database to be later pulled back out and displayed to the user. Searching and reading up on different methods I found a post over at stack exchanged ...
3
votes
1answer
237 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 ...
5
votes
1answer
192 views
Are there any Implementations of Secure Indexes?
There are several papers about Secure Indexes, for Example "Searchable Symmetric Encryption:
Improved Definitions and Efficient Constructions" and "Secure Indexes". ...
1
vote
2answers
108 views
What cipher mode is suitable for independantly decryptable short messages?
I'm building a small VoIP client which transmits encrypted audio data via UDP, and some packet loss is expected, so each packet will need to be decrypted separately even if others in the stream don't ...
3
votes
2answers
357 views
Implementing AES in C++: 4x4 Array of unint8_t, or 4x1 array of uint32_t?
I'm implementing AES in C++, and, inspired by the way words are handled in SHA, I decided this time to handle the state as a one dimensional array of 4byte unsigned integers as opposed to a two ...
3
votes
2answers
297 views
How does one calculate the cryptoperiod?
NIST Special Publication 800-57 defines a cryptoperiod as
the time span during which a specific key is authorized for use by legitimate entities, or the keys for a given system will remain in ...
3
votes
1answer
165 views
How does the energy consumption of the SHA-3 finalists compare?
I am curious, is there any paper where SHA-3 competitors are compared in terms of energy efficient?
1
vote
1answer
292 views
How can I implement the “Multiplication Modulo” and “Addition Modulo” operations in IDEA?
I am currently working on IDEA (International Data Encryption Algorithm), and I don't know how to perform Multiplication Modulo and Addition Modulo.
This is how IDEA operates:
IDEA operates on ...
3
votes
3answers
222 views
How to avoid a chicken and egg scenario with encrypting passwords?
I am working on application that allows users to upload files containing company data and then share those files with a list of other users that have specific roles within the system.
I want to ...
0
votes
1answer
154 views
RSA 1024bit decryption performance
i want to know how many RSA 1024 bit long key decryption can a regular pentium4 computer do per second ? how to calculate RSA performance and determine its remaining time ?
-1
votes
1answer
181 views
Recommended Books for Cryptography : Theory and Implementation [closed]
It is a great idea if experts in Cryptography from mathematicians to security engineers introduce books and textbooks which they think is helpful or instructive for all people interested in the ...
2
votes
2answers
169 views
Cryptographic GUID?
I need a GUID. Really just any number that is likely to be unique. However I prefer not to leak time and other things as a GUID may leak. What should i use as a cryptographic replacement? I was ...
1
vote
1answer
117 views
Why does .NET's ECB mode implementation append a constant block to my ciphertext?
Consider the following code and output:
...
0
votes
0answers
242 views
Matlab vs mathematica vs python [closed]
I just want to know that which is better for cryptography implementation ie in dealing with huge numbers.
4
votes
1answer
214 views
Why x00 is usually avoided in salt?
In .NET Framework, there is a cryptographic Random Number Generator (RNG) provider which enables to generate a cryptographically strong sequence of random bytes. This provider contain, among others, ...
0
votes
3answers
73 views
MISTY1 Implementation error
I am trying to implement MISTY1. It's RFC, RFC2994, contains psuedocode that I basically copy and pasted into Code::Blocks. However, I managed to mess that up somehow. After 2 days, I still have not ...
2
votes
0answers
73 views
How to properly format a PGP Message Block?
As sort of a follow up to my (currently) unanswered question, if it is correct, how do i properly calculate and format the packet that actually stores the data being encrypted? I thought I knew what I ...
2
votes
2answers
218 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 ...
2
votes
1answer
306 views
Is there a standard for OpenSSL-interoperable AES encryption?
Many AES-encrypted things (files, strings, database entries, etc.) start with "Salted__" ("U2FsdGVkX1" in base64).
I hear it's some sort of OpenSSL interoperability thing a b c.
Is there some ...
2
votes
1answer
395 views
Format-preserving encryption implementations
I'm looking for a general, free implementation of Format-preserving encryption
as described in this article and on wikipedia.
Possibly in a well established cryptography toolkit.
My intention is to ...
4
votes
1answer
190 views
Length of data to hash for PGP
I have finally managed to verify some simple PGP signed message blocks. However, I discovered that for some reason, my implementation limits me to verifying data that is 9-16 bytes long. no less. no ...
1
vote
1answer
379 views
4
votes
3answers
278 views
Order of cascaded ciphers
Does the order of a block cipher cascade (e.g. in TrueCrypt) make a difference to the security provided, assuming independant keys?
For example:
...
1
vote
0answers
150 views
Proper formatting of symmetric algorithm secret key
Given this description from RFC 4880 sec 5.1:
The value "m" in the above formulas is derived from the session key as
follows. First, the session key is prefixed with a one-octet algorithm
...
1
vote
0answers
92 views
Setting protocol parameters to achieve concrete security
Background
One issue with modern security proofs is that they are usually asymptotic. In other words, such proofs are usually formulated as follows: For any polynomial-time adversary $\mathcal A$, we ...
1
vote
3answers
309 views
Learnt cryptography and python. What do I do next? [closed]
OK, so I have spent the last 3 months learning cryptography through the Coursera-Stanford crypto course. I also learnt Python thoroughly.
Now I am eager to use this new-found knowledge. But neither ...
1
vote
3answers
200 views
Getting started [closed]
I'm looking for a good place to start in cryptography and places to go to get free books etc on the topic.
I have been looking online but I always get stuck at some point or another. I need something ...
1
vote
1answer
181 views
OpenPGP Public-Key Encrypted Session Key Packet Key ID generation
Im probably just not reading something again, but:
RFC 4880 says that a OpenPGP Public-Key Encrypted Session Key Packet (tag 1) is made up of
...
2
votes
3answers
424 views
Hash function in PBKDF2
From this excellent answer I learned (correct me if I am wrong) that when writing a block cipher with say key size 128 bit, one has to pad the password given (variable size) so that it becomes exactly ...
3
votes
2answers
569 views
How key materials are generated in SSL V3 from master secret
The generation of key materials is given by
...
2
votes
1answer
193 views
Padding for the TEA
Sorry if this is a noob questions, but I finally figured out how to implement the Tiny Encryption Algorithm in C++.
My question is what to do about padding the key and the plaintext? I know that ...
2
votes
2answers
139 views
MD5 implementation doubt
In MD5, there are four rounds. After every round, why do we need to add the computed Q values to the initial values and then take this value as input to the next round. For example after the first ...
2
votes
1answer
201 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 ...

