# Tagged Questions

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

83 views

### Library to find an addition chain for a large number? [closed]

I need a short addition chain for a number $n>2^{100}$ in order to implement a fast exponentiation. The memory footprint is not important. Finding an optimal chain for a large number $n$ is ...
3k views

### Who uses the RSA BSAFE library? [duplicate]

Who uses RSA's BSAFE library? Does anyone know what products use it, or have any statistics on how many end users use something that is built on BSAFE? Background: BSAFE is one of the oldest ...
189 views

### Parallelization of CFB mode encryption and decryption

While reading Evaluation of Some Blockcipher Modes of Operation by Rogaway (someone just linked it somewhere), I noticed two claims about CFB that I'm not sure I understand: Regarding whether CFB ...
79 views

### How to select parameters based on some condition

I am implementing a protocol for authentication where parameters need to be selected with $gcd(\mu,\phi)=1$ where $\phi=(p−1)(q−1)$. What is the best way to select the parameters while implementing
186 views

### Implementing AES MixColumns with fewest XOR gates

I'm playing with Contiki (O.S. for constrained devices such as sensors and micro-controllers) and particularly with the AES encryption in software (the one available in Contiki source code). I'm ...
294 views

### Discrete Logarithm (512 bits numbers) - Find exponent parameter

I'm trying to resolve a discrete logarithm equation: $$y = g^x \bmod p$$ Every parameter is a 512-bit number. I know the values for $g$, $y$ and $p$ and I need to find the $x$ value. Finally, I know ...
168 views

### Calculate the security of a cascade cipher

I’m reading “The Security of Multiple Encryption in the Ideal Cipher Model” and I’m having a hard time understanding something. How do I calculate the bounds of cascade cipher from the following ...
214 views

### Addition step in MD5 implementation

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

### Blockwise Montgomery multiplication

I have to implement a 256*256 bit Montgomery multiplier for pairing computations. The straightforward approach is to use a bit-serial version, but I would like to utilize the built-in 64*64 bits ...
79 views

### zero knowledge framework for c programs - how to prove correct C program execution with private inputs

I am looking for a zk framework that could be used for proving correct execution of programs written in C (or any other high level language) such as: I know x s.t. SHA-256(x) = y (y is public, x is ...
812 views

Does the order of a block cipher cascade (e.g. in TrueCrypt) make a difference to the security provided, assuming independant keys? For example: ...
135 views

### Rsa Key Exchange Protocol

Moderators: Maybe this question will be move to other sub-forum. My question is Anybody know some link with a tutorial of how implement the RSA key exchange protocol using java for chat comunication?
1k views

### How do institutions like banks do RSA with big primes?

When encrypting with RSA it is often infeasible to decrypt by just doing c^d mod n, because for example when using the primes $(p,q)=(12553,1233)$, which are small ...
352 views

### How to create a PEM file for storing an RSA key?

I have an RSA private key $\{d,n\}$ and a public key $\{e,n\}$, where $n$ is the modulus, and I also have the prime factors $p$ and $q$ of $n$. I want to create a PEM file containing this information,...
275 views

### Sage Vs C++(with NTL) for implementing cryptosystems

Is Sage a better alternative to C++(with NTL), for programming that involves math objects like polynomial rings in cryptosystems? I hear that Sage is an open source alternative to Magma. I have used ...
182 views

### Asymmetric encryption that is secure for (almost) any foreseeable future

Recently, I've been reading a couple of papers about building cryptosystems that are secure for up to 30 years. But for some applications, this seems a bit low to me. So I am wondering if considering ...
826 views

### Is there any implementation of scrypt that allows a specific limit on memory?

The answerer has commented that scrypt's memory use is "only a function of r". $\:$ However, he has not addressed my argument that it also depends on N, in one of my comments from over 5 days ago. I ...
379 views

### What is the most light-weight symmetric cipher thats still usefull?

I need a very light encryption scheme which costs almost no performance during encryption (while decryption may be slow). I found 5 algorithms: RC4, DES, LED, PRESENT, and Piccolo. But how do I ...
161 views

### Vigenere ciphers : Need help for math analysis

I've been learning about Vigenere ciphers and then thought of another method to Encrypt and decrypt that. This's my method to encrypt : ...
259 views

### How to implement the Salsa20 hash function?

I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation. I have Sections 1-7 passing the test examples provided. I am now stuck on Section 8, The ...
210 views

### Crypto++: How to re-generate pseurandom integers in Crypto++

I'm using Crypto++ to implement my protocol to mask a value $y_i$ by a seudorandom value $r_i$ such that $m_i=y_i \cdot r_i$. Since there are many $r_i$'s I want to generate them using PRG and then ...
76 views

778 views

### Understanding the FMS attack on WEP

I am trying to implement the Fluhrer, Mantin and Shamir attack, one of the ways to break WEP. I seem to have hit on a problem. I have no idea whether or not it is a programming error, or if I don't ...
1k views

### SHA512withRSA - Looking for details about the Signature Algorithm

I am trying to find information about the Signature Algorithm SHA512withRSA and have been unsuccessful so far. In the current state, the signature is too long, so I would like to check the code for ...
2k 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 ...
835 views

### Subverting the key generation step in RSA public key cryptography

I am interested in the ways the implementation of 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 ...
152 views

### Is it insecure to encrypt the wrong plaintext?

Most plaintext must be fed as a string or a binary object to be encrypted. However, it's often possible to mis-decode the plaintext before encrypting it. i.e. If it's received as a string in JSON, ...
2k views

### Reversing DJB2 Hashes

I have some spare time, and a few hundred DJB2-hashed values sitting around. I thought I'd try to do something "useful" and invert DJB2, such that I could calculate the plaintext of the hashes (which ...
257 views

### Decryption issue with self-coded AES-128

I have written my own AES-128bit implementation in Java, till yesterday I thought it would be alright. (I was working on the encryption) Now I’m trying to decrypt my encrypted cleartext, but this ...