# All Questions

1answer
129 views

### Transparent cipher

I'm trying to implement this protocol: Alice has her permanent key $K_1$. She computes $E(K_1, P)$. She wants to share $P$ with Bob, Carol and Dave. For each of them she: 2.1. Generates $K_2$. ...
1answer
184 views

### How to represent a 32-byte SHA2 hash in the shortest possible string?

I'm calculating a SHA2 hash of a certain sensitive key value. I need to store files on disk using this hash a directory path prefix. So lets say I hash the key value 150023, I get a 32-byte value ...
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 ...
1answer
172 views

### Does ShaCrypt have the properties which make BCrypt slow on GPUs?

Sha256Crypt / Sha512Crypt are designed based on ideas of BCrypt but use SHA instead of Blowfish because of political requirements. The Sha*Crypt algorithms have the advantage that they are used in ...
2answers
398 views

### How did LinkedIn “salt” all their passwords?

First, just to make sure I understand "salting" correctly: You randomly generate a string to append to the password before hashing it, so as to increase its length and make precomputed tables much ...
2answers
607 views

### Is HMAC-DRBG or Hash-DRBG stronger?

Out of the two deterministic random bit generators defined in section 10.1 of NIST SP 800-90 (i.e. based on hash functions), which one is cryptographically stronger? Hash-DRBG (Section 10.1.1) ...
1answer
352 views

### Okay to use OpenSSL to encrypt then sign a message?

I am planning on encrypting a message then signing the message so the recipient can authenticate the source. Reading this article has me concerned that I'm doing something wrong. My current plan is ...
1answer
199 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 ...
1answer
223 views

### What's the reason for applying the hash twice when hashing with salt?

One of the typical approaches to computing a salted hash is this: hash(salt+hash(secret)) where hash is something like SHA-256 hash function - taking any size ...
2answers
125 views

### Does a hash function in chaining mode or in counter mode make a better pseudo-random number generator?

I have two pseudorandom generators: $f_1$ takes a random seed $l_0||r_0$ $\in \{0,1\}^{160}$ as input and outputs $r_1||r_2|| \dots ||r_k$, where $l_i||r_i = \operatorname{SHA-1}(l_{i-1}||r_{i-1})$ ...
1answer
169 views

### Attack vectors introduced by compilers

I have a question about attacks on the implementation of cryptographic code that are enabled by compilation and compiler-optimisations. I am aware of this. Would anyone be able to point me to other ...
3answers
433 views

### Which attacks can be avoided by the use of OFB instead of ECB?

For a file encryption program, I was told to use Output Feedback mode (OFB) instead of ECB (Electronic code book) mode. Which attacks can I avoid by this choice?
2answers
157 views

### How hard is to find the operators of an addition knowing the sum of them?

I want to learn whether or no there is a cryptographic primitive,scheme assumption that is based on the following hard problem if it is hard . By hard we mean that we have a polynomial adversary: The ...
2answers
123 views

### Idea for secure password hash-likes, is this feasible/usable/workable?

(Hand moved from stackoverflow.com,due to suggestion) Since breaking password hashes has become a new passtime for scriptkiddies, I thought of the problem and came up with a novel(?) idea. store ...
3answers
391 views

### CBC - a canonical mode, even though there are streaming modes

Why is CBC considered the canonical mode when there are streaming modes available such as CFB and OFB? One thing that I can think of is that in CBC you can easliy do range-based decryption. All you ...
0answers
118 views

### RSA SecurID: Unable to access via web manager [closed]

I'm having an error with access to the web admin of my RSA SecurID server. I'm getting an error of 100: access denied. The RSA ACE/Server rejected the passcode. I'm guessing that this is most likely ...
1answer
93 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 ...
1answer
105 views

### Proof of work scheme with one and only one correct answer

I need a problem that has one and only one solution, such that the solution is hard to find but easy to verify. I need to be able to generate the problem deterministically from a random seed. So ...
2answers
107 views

### Do these 2 KSA shortcuts weaken RC4?

Alice securely gives Bob a secret key so they can exchange 10 different messages encrypted with RC4. (Messages will include a counter for uniqueness and a MAC for authentication.) For each message ...
1answer
455 views

### How can 3DES encryption use decryption in the middle step?

I have been reading about the 3DES algorithm and I cannot understand one part. In 3DES we do following operation: $$C=E[K_3,D[K_2,E[K_1,P]]].$$ Where $C$ is ciphertext, $P$ is plaintext, $E$ is DES ...
0answers
58 views

### What is cross-certification [closed]

What does cross-certification mean? Can I program my app to accept all certificates that are cross-certified by a certain CA? How common practice is this?
1answer
195 views

### File Encryption/Decryption in ECB mode [duplicate]

Possible Duplicate: Removing Padded Value in Decrypted Message I tried to encrypt and decrypt a file in ECB mode using AES Algorithm but I encountered one problem during decryption, I don't ...
0answers
27 views

### SHA-512 hash collisions [duplicate]

Possible Duplicate: Is SHA-512 bijective when hashing a single 512-bit block? Is there any guarantee that there are no collisions for all 512-bit input values for SHA-512(Every 512-bit ...
1answer
379 views

### Removing Padded Value in Decrypted Message

How to remove padded value in Decrypted Message? I am using AES Algorithm.. ex: this is the decrypted message.. "abcdefghijklmn " there is a 2 space in that decrypted message which is equivalent ...
1answer
385 views

### How to encrypt a File using AES Algorithm? [closed]

How to encrypt a file using private key in Java. Adding this question, how to generate the private key for the same. Before posting I went through some question like How to perform file encryption ...
2answers
84 views

### How can I protect against the failure of a block or symmetric cipher?

Can I protect against the failure of a block or symmetric cipher by chaining different techniques together? If so what implementation details should I be aware of? Are some combination of ciphers ...
2answers
189 views

### Is RSA in a ECB-like-mode safe for bulk encryption?

Let's say I would like to communicate with my friend using asymmetric/public-key encryption, e.g. RSA. (Note: I do realize that in practice this is done through an intermediate symmetric key, but ...
2answers
164 views

### K out of N encryption

A friend just showed me how to combine padlocks to achieve a lock that opens when k out of n people turn their keys. I was ...
1answer
221 views

### OpenPGP Signature Packet hashed data

RFC 4880 describes the version 4 signature packet, tag 2, as ...
2answers
280 views

### Finding the LFSR and connection polynomial for binary sequence.

I have written a C implementation of the Berlekamp-Massey algorithm to work on finite fields of size any prime. It works on most input, except for the following binary GF(2) sequence: $0110010101101$ ...
1answer
134 views

### Using compression to test encryption

Is the uncompressibility of encrypted data a necessary property for a good cryptographic algorithm? To make a crude experiment, I encrypted an 8K file with all 'A' and then compressed both the ...
1answer
180 views

### “Signing” with public key

For this question, the following caveats and assumptions hold: There exists a 2048-bit RSA key pair used exclusively for signing/verification The private key is kept completely private There exists ...
2answers
138 views

### Is this streamable combination of encryption and MAC secure?

I want to combine encryption and MAC. For encryption I use AES-256 with CBC and PKCS5Padding. For MAC I use HmacSHA512. I use the Encrypt-then-Mac approach (calculate MAC over the ciphertext and ...
2answers
291 views

### How to get the keyword from a keyword cipher?

I was given a ciphertext and now I am trying to break it via looking for the keyword. This is a keyword cipher. So: PlainEnglish: ABCDEFGHIJKLMNOPQRSTUVWXYZ If ...
3answers
913 views

### In the SHA hash algorithm, why is the message always padded?

In the SHA hash algorithm the message is always padded, even if initially the correct length without padding; the padding is of the form "1" followed by the necessary number of 0s. Why is it ...
1answer
249 views

### Replay attack prevention under strict conditions

Say I have a request-response protocol and the task to make it immune to replay attacks. The requirements are as follows: The defense mechanism cannot rely on the clocks of the parties. The defense ...
1answer
150 views

### How to properly add ECDSA private keys?

I'm currently working on an application that requires me to add two ECDSA private keys in order to make a new private key. The result has to have the property, that its corresponding public key is the ...
1answer
104 views

### Decimal to binary question [closed]

This is an easy question, but I can't explain it lol, how would you guys explain it? There is a procedure for converting a decimal number to binary in the following way: repeatedly divide the number ...
2answers
99 views

### When to prefer exchanging cryptographic certificates over exchanging only public keys?

Let's think of the following case: A group of peers want to exchange messages with each other. They use public-key cryptography to sign and encrypt messages. Anyone with any name can join the ...
2answers
235 views

### Attacks of the MAC construction $\mathcal{H}(m||k)$ for common hashes $\mathcal{H}$?

Consider a common practically-collision-resistant Merkle–Damgård hash function $\mathcal{H}$ (e.g. SHA-1, RIPEMD-160, SHA-256, SHA-512). We define a Message Authentication Code $\mathcal{C}$ (k,m) ...
1answer
170 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 ...
2answers
316 views

### Is every output of a hash function possible?

Is every output of a hash function (e.g. SHA1, MD5, etc) guaranteed to be possible, or, conversely, are there any output values that cannot possibly be created from any input? If so, what guarantees ...
1answer
124 views

### Safely use CryptSignAndEncryptMessage?

I am developing an application that sends messages which I want to encrypt and sign. The CryptoApi offers a function called CryptSignAndEncryptMessage. The description says, what this function ...
1answer
297 views

### Why are MACs in general deterministic, whereas digital signature constructions are randomized?

The fact is I'm not quite sure if my question statement is true, however all the MAC constructions I know of (e.g. CBC-MAC, CMAC, HMAC) are deterministic, whereas many constructions for digital ...
2answers
268 views

### are CFB and OFB really meant for streaming?

CFB, OFB and other modes are meant for streaming and don't require padding. Are there still limitations such as the text needs to be greater than key length?
3answers
225 views

### How can one sign with NTRU?

I am looking at implementing NTRU, but I noticed that while the encryption/decryption algorithm seems to be mature and well-documented, there is comparatively little information about how to sign ...
1answer
195 views

### Is quantum key distribution safe against MITM attacks too?

i read this recently: http://www.newscientist.com/article/dn12786-quantum-cryptography-to-protect-swiss-election.html and some parts of this: http://en.wikipedia.org/wiki/Quantum_key_distribution ...
1answer
184 views

### Which MACs can be converted into a secure unkeyed hash function?

It is known that setting the secret key to a fixed, public value does not make MACs like CBC-MAC or GMAC into secure unkeyed cryptographic hash functions that could be used - for instance - for ...
1answer
58 views

### Cryptographic Algorithm/Protocol needed

I am trying to achieve the following: Encrypted files are stored on users filesystem. The user uses my client to authenticate against a server. Once he is authenticated successfully he gets a token ...
0answers
60 views

### Applying multiple hash functions to improve security? [duplicate]

Possible Duplicate: Guarding against cryptanalytic breakthroughs: combining multiple hash functions I'm a total newb to cryptography but after reading what I've read about it, I had a ...

15 30 50 per page