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
1answer
140 views

How does DJB's nistp224 manage to fit compressed points into 224 bits?

DJB's nistp224 program purports to be an implementation of elliptic curve Diffie-Hellman relative to the standard NIST P-224 elliptic curve. To the best of my ...
3
votes
1answer
243 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
320 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. ...
3
votes
8answers
569 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 ...
5
votes
1answer
544 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?
2
votes
2answers
261 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 ...
2
votes
1answer
970 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
72 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
249 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
643 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?
3
votes
1answer
323 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?
4
votes
1answer
1k 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 ...
4
votes
1answer
238 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
2answers
2k 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) ...
4
votes
1answer
258 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 ...
3
votes
3answers
432 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? ...
8
votes
4answers
418 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
437 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 ...
5
votes
1answer
639 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 ...
10
votes
3answers
2k 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 ...
7
votes
1answer
599 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 ...
12
votes
3answers
1k 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 ...
6
votes
3answers
741 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 ...
11
votes
1answer
2k 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?
8
votes
2answers
765 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
2k 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 ...