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 ...
3
votes
1answer
171 views
Does omitting the first two lines of RC4's pseudorandom 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 ...
0
votes
1answer
191 views
Why does my implementation of CBC mode only decrypt the first block correctly? [closed]
I have the following code that uses a CBC mode to encrypt a text by dividing it to 3-elements block. But it only works correctly on the first block which is xored with the IV.
...
4
votes
3answers
285 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
2answers
168 views
How do I demonstrate that a PRNG not designed for cryptography is not suitable for generating passwords?
This is a replication of this question on Stack Overflow. There's class Random in .NET runtime which is designed for use as a cheap fast source of pseudo-random ...
5
votes
1answer
297 views
Are there any MGF1 and OS2IP functions available in C?
I need MGF1 and OS2IP functions, as defined in the PKCS #1 v2.1: RSA Cryptography Standard.
Is there anything available in OpenSSL, or any other open C library?
1
vote
2answers
767 views
How to perform file encryption using 128-Bit AES?
I am confused, how can I encrypt a file using 128 Bit Advanced Encryption Standard?
Do I need only to encrypt the file name and it's content or is there something that I need to do to encrypt it? Is ...
2
votes
1answer
628 views
AES-NI implementation examples
Newer Intel and AMD processors have hardware support for implementing AES using the instruction set AES-NI (instructions AESENC, AESKEYGENASSIST etc). Do you know of any clean example implementation ...
2
votes
1answer
206 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 ...
5
votes
1answer
197 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". ...
2
votes
1answer
71 views
Rapidly changing passwords?
Suppose you need to authenticate yourself to a program with the password - but the program's source code is public, the program doesn't have access to any private information and all your ...
6
votes
2answers
197 views
Unit testing a library RNG and its seeding for practical security
Suppose I have a cryptography library that provides me with a black-box random number generator that is supposed to be suitable for long-lived key generation. (Under the hood it may be assumed to use ...
1
vote
2answers
444 views
Why do all hash functions use big-endian data?
I've looked at several hash function specifications, and they all emphasize the need for big-endian byte ordering. Is there a reason for this that has to do with security, or is it simply convention?
2
votes
1answer
294 views
Implementing the BGN Cryptosystem
Question: 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 ...
1
vote
8answers
468 views
Does a public key absolutely need to be used to initiate an encrypted session?
I am a software developer working on an application with the .NET platform. This application needs to provide a secure connection and encrypt all data between the client and the server. It is a ...
3
votes
1answer
166 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?
3
votes
1answer
246 views
What is the computational cost of a public key certificate signature verification?
What is the computational cost of a certificate signature verification in terms of exponentiation, multiplication and other computation operations?
1
vote
0answers
80 views
Storing counter value of HOTP at client side [closed]
How can we store counter value on the client side in HOTP??
3
votes
1answer
701 views
What is the 'Version Incompatibility" Problem in TLS 1.1/1.2 and 1.0?
It's unclear to me if there are multiple problems, or a single one, (and just what that problem is) with servers incorrectly negotiating down from a client offering 1.1 or 1.2 to something they ...
3
votes
1answer
190 views
Undecrypt using the OpenSSL EVP API?
I'm writing a client-server encryption scheme for homework, and I've stumbled upon what might be a fatal blow to my current implementation.
When using AES-256-CBC on the two sides, it's important ...
3
votes
1answer
211 views
Best choice of finite field for AES on a 4-bit microcontroller?
As the finite field of $GF(2^8)$ are isomorphic to $GF((2^4)^2)$, $GF((2^2)^4)$ and $GF(((2^2)^2)^2)$,
which of the fields is best suited and most efficient for 4-bit MCU and why? Would it be ...
6
votes
2answers
504 views
Can one implement AES on 4-bit microcontroller?
It is possible to implement AES on 4-bit microcontroller? As far as I know, AES on 8-bit microcontroller are common especially for light weight application such as the RFID.
I have yet to come across ...
3
votes
3answers
307 views
How can I avoid calculating with huge numbers when implementing the RSA algorithm
There is 26-letter English alphabet.
There is the plain text: TRYAGAINLATER.
I need to encrypt it by RSA algorithm with the public key 53.
What is the ciphertext?
...
7
votes
4answers
301 views
Can I determine if a user has the wrong symmetric encryption key?
We're using the Objectivity/DB object database with a custom encryption plugin that encrypts serialized objects on disk. Encryption uses AES with a shared secret key held by all users. I would like to ...
2
votes
1answer
298 views
Hash or encryption function for challenge-response protocol?
Say I have an authentication protocol where the shared secret is never transmitted. The server passes a challenge to the client and the client calculates a response using an algorithm where the ...
4
votes
5answers
481 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 ...
2
votes
2answers
907 views
How to distribute session keys in public key cryptography?
In public key cryptography we can also use session keys which are symmetric. How do the sender (say a server) provides this session key information to its clients?
If the sender (here server) ...
5
votes
1answer
327 views
What is the proper way to use a client nonce?
I've implemented an API for one of my clients, it relies on nonces and a shared secret. The structure:
Client's Site (CS) requests nonce from My App (MA), posting their username
MA verifies the ...
3
votes
2answers
615 views
How key materials are generated in SSL V3 from master secret
The generation of key materials is given by
...
6
votes
1answer
468 views
Implementation of Tao Xie and Denguo Feng's MD5 attack
It is well known that MD5 is completely broken today - however, to understand the theory behind the attacks I am looking for an implementation of the collision attacks described in the 2009 paper A ...
9
votes
5answers
2k views
Types of Cryptography for a 4-8 bit microcontroller
This is more of a research question.
I was wondering what types of crypto algorithms would work best on a small 4-8 bit micro controller. I recently read a paper called Security Considerations for ...
7
votes
2answers
560 views
How should I store passwords that need to be available in plain text?
Suppose I need to store login information for a third-party website for a few users, how would I go about doing it?
Since I am logging into a third party website, I need the password in plain-text, ...
14
votes
3answers
1k views
Reverse engineering 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 ...
5
votes
3answers
2k views
Is there any opensource white-box implementation of AES or DES?
I googled it and give me no result. There is a binary executable of white-box implementation of DES (scroll down), but no source code provided.
The same page also links various papers about ...
5
votes
3answers
494 views
How can my application make sure the right symmetric key is used for decryption?
I am developing an Encryption/Decryption Utility using Adobe AIR. I have chosen the AES algorithm and currently use the as3crypto library for this. My query is in ...
10
votes
1answer
1k 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?
11
votes
3answers
933 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 ...
8
votes
3answers
1k views
How can a random salt for a hash function work in practice?
I understand the theory behind the use salts in hash functions, but when I see it implemented, the implementations always generate the salt on the fly and the salt appears to be different for every ...
