# All Questions

24 views

### Recover plaintext from truncated ciphertext using AES for FPE

I am trying to implement an FPE for a 19-digit long number. I am trying to follow the lecture of Prof. Dan Boneh and here is how I understand it: Get the nearest power of two greater than 10^19 -> ...
1k views

### Cryptography vs Security

This may sound a little bit of basic but here it goes… Which of the following is correct? “Cryptography is under the security field”, or “Security is under the cryptography field?” Cryptography ...
208 views

### Why does the SRP-6 calculation of B include a multiplier k = 3?

In SRP-6 $B$ is calculated as $B=kv+ g^b, k=3$. What is the purpose of $k$, and why was it fixed as $3$? (In SRP-6a, this value $3$ is replaced by $k = H(N,g)$, but this question is about SRP-6.)
56 views

### How are secure hashing and encryption algorithms proven?

Given that: You should always use proven secure hashing and encryption algorithms, rather than attempting to write your own. What's the process for criteria for an algorithm being proven? Is ...
111 views

### How to encrypt a file for random access

I am a programmer familiar with C/C++ and Python. Lately, we got an assignment from a team asking us to work on one of their projects: we need to make a small program to encrypt a large file using ...
336 views

### A patched SHA1 attempt for password verification

This is a classical scenario: For our web based authentication platform we have a username and a password field. User enters these values and presses Log In. The browser gathers the user data, ...
15 views

### IND-CCA2 secure schemes without Plaintext Awareness?

I have been reading up on IND-CCA2 security and was wondering: Are there efficient IND-CCA2 secure schemes that do not require plaintext awareness? I'm guessing yes - could someone point me to these ...
25 views

### Design of Block cipher

Is there any other method for designing a block cipher other than Substitution and Permutation Network(SPN) and Fiestel Network?. Is Using variant of AES will give the same level of security as AES ...
16 views

### Regular MACs vs Carter-Wegman MAC

Carter-Wegman MAC variants (VMAC, UMAC etc) are known to be very fast and efficient when compared to MAC algorithms that are based on block ciphers and compression functions (like HMAC, CMAC etc). ...
19 views

### Private Key - Memory Lifecycle

I often heard about private key storage, but rarely about key life cycle in memory. For example, when SSL is used from one peer, the private key is used to sign messages or decrypt other peers' ...
15 views

...
193 views

### S-box with differential uniformity = 2

I read that we do not know if there exists an 8x8 sbox with differential uniformity = 2. I suppose we cannot compute every possible sbox because there are $64!$ possible s-boxes. Am I right?
35 views

### Can anyone help me decrypt this? [on hold]

We were told that GREENENVY was a hint but I don't know how to do anything from there. AU/W/ACBXMSN/IEHOFIE/NZ
410 views

### Do I need to prepare plain text before encryption?

When I want to encrypt chat messages (in ASCII) before sending, whether it brings some bit of security if I add some extra bytes to the message or shuffle it in some way? I can even try to make data ...
127 views

### Is Chaocipher a secure cipher under ciphertext-only attack?

Chaocipher was invented by John F. Byrne in 1919. The algorithm was recently revealed – see Moshe Rubin's Chaocipher Revealed, the Algorithm (PDF). While a known plaintext attack successfully finds ...
40 views

### Parallel variant of Carter-Wegman MAC with incremental property

Is there a variant of the Carter-Wegman MAC algorithm that is fast, parallel and has the property of incremental crypto?
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 ...
55 views

### Encryption method with master key and user keys

I am working on a concept for a game that in the end will allow data sharing via plain text, but I would like to give the user the option of encrypting the data so that other players cannot modify it, ...
2k views

### Why is TLS susceptible to protocol downgrade attacks?

A recent blog post from Ivan Ristić (expert extraordinaire on all things SSL) says: all major browsers are susceptible to protocol downgrade attacks; an active MITM can simulate failure conditions ...
57 views

### Entropy Loss of KDFs

Am I losing any entropy when using KDFs, such as the ones in NIST Special Publication 800-108? For example, can I derive 128-bit session keys from a (uniformly random) 128-bit master key?
27 views

### Detect desynchronization in HOTP authentication

In HOTP authentication, is there a way for the system to detect that the token has been desynchronized? If so how does it know that the OTP was generated from a desynched (but valid) token and is not ...
195 views

### Using HMAC-SHA256 with short passwords and sliced outputs for short-lived secure hashing

I don't have much background in cryptography, so forgive me if I'm using the wrong mathematical terms to explain my needs. Following this question, I learned that taking a random secret 16-bytes ...
369 views

### Are there any secure commutative ciphers?

This answer lists two commutative cipher algorithms - Pohlig-Hellman and SRA. However, they don't appear to be too secure. My question is, here there any commutative ciphers out there that are secure ...
325 views

### How do we compute IV+1 in CTR mode?

This may be a very simple question, but I have not found info about this in any place. My question is about CTR mode: When it says $IV+1$… How do we make this operation? For example, if I have the IV ...
589 views

### How does SafeNet MobilePASS generate passwords?

We use MobilePASS at work but the latest version of the android client seems to be buggy so I wanted to have a go at implementing the algorithm myself. You can download the client to play with here: ...
26 views

### Unknown compression algorithm [on hold]

I got data which is compressed but I fail to find the compression algorithm. The data is part of a larger file from which I know the layout, So I managed to find out few things. What I know: I ...
201 views

So these days I see everyone using AES-GCM. What are its advantages over simple CTR+HMAC modes? Is it speed? Or ciphertext length? And what are the security tradeoffs, both in terms of practical ...
438 views

### Difference between a nonce and IV

I know the generic difference between a nonce and an IV. I am specifically looking for a clarification on these terms as used in the "Evaluation of Some Blockcipher Modes of Operation" by Phil ...
125 views

### How HOTP values are validated according to RFC 4226

In Section 7.2 "Validation of HOTP Values" of the HOTP spec (RFC 4226) it says, in part, The HOTP client (hardware or software token) increments its counter and then calculates the next HOTP ...
1k views

### Does SHA-1024 hash exist?

Does SHA-1024 cryptographic hash function exist similarly to SHA-512? If not, what's the reason for that? Links: SHA-2 at Wikipedia
76 views

### SRP-6 vulnerabilities when N is small

I'm one of the developers of an application which uses SRP-6 as the authentication mechanism. The authentication part of the code is very old and uses N with only 256 bits (all arithmetic is done in ...
31 views

### How to generate ECC (160 bits) Keys with OpenSSL?

I have this problem: I want to generate RSA Keys at 1024 bits with OpenSSL. I do this with this commands: To generate RSA Key at 1024 bits: openssl genrsa -out rsa.key 1024 To view the content of ...
10k views

### How much would it cost in U.S. dollars to brute force a 256 bit key in a year?

I am often told that any key can be broken and that it is only a matter of time and resources for any key to be broken. I know that this it technically true. However, I think that there is probably a ...
39 views

### GPG & Mcrypt - difference?

in short I'm learning GUI programming in python and thought it could be interesting to make a small GUI for symmetric encryption. Not being mad/mathematical/experienced (take your pick) enough to try ...
195 views

### Is my id obfuscation algorithm secure?

I'm designing an id obfuscation system. My system includes: Embedded chips, each chip has a unique 32-bit address (id). Server Insecure low-bandwidth unstable one-way channels from the chips to the ...
86 views

### Rainbow tables, where have I got it wrong?

There seems to be some error in my understanding of the concept of rainbow tables, despite going through quite a bit of articles on it. Let me show what I don't seem to agree with. My plain text is ...
149 views

### What algorithm is used for 1024 bit hash which appears on 56th page of Cicada puzzle runes? [on hold]

On the internet there is unsolved mystery of 3301/Cicada where decrypted text says: "AN END. WITHIN THE DEEP WEB TH ERE EXISTS A PAGE THAT HA SHES TO: ...
110 views

### Where do I truncate the bits in SHA 256 hash algorithm?

I'm implementing SHA-256 in PHP using strings. Where do you truncate in the algorithm? There are a lot of places where there's binary addition happening so the number of bits in $W(i)$ keep ...
542 views

### Is Curve25519-java secure?

I have only about 2 weeks of cryptography experience mostly in the form of questions on bitcoin.se. Is Curve25519-java up to date with current Curve25519 standards? Is Curve25519 itself secure? ...
269 views

### Can I construct a feasible stream cipher out of HMAC and a secure hash algorithm?

I have constructed a stream cipher from a secure hash algorithm and a HMAC. Here is a brief description of the algorithm: Let: (Actually Objective-C styled pseudo code) ...
903 views

### Is there a hash function with 2048bit output?

Is there a publicly available cryptographic hashing algorithm with 2048 bit output? The standard ones are "only" up to 512 bit (SHA-512, WHIRLPOOL). (2048 bits are 256 bytes, so it would be useful ...
121 views

### Simple proof that shows AES is not a uniform permutation on any n-bit string?

Is there a simple proof that shows AES is not a uniform permutation on any $n$-bit string? Since I'm just starting with crypto, I'd like to see a simple yet elegant proof for the said property. ...
25 views

### Keep GPG revocation certificate in safe place? [on hold]

Do I have to keep the revocation certificate of my GPG key in a safe place or may I place it in e.g. Dropbox to have it ready on all my machines? I know that, if compromised, the certificate can be ...
188 views

### Attacking a hardware AES implementation if it leaks the intermediate round states

Let's say that we have a hardware AES implementation that, on request, will encrypt or decrypt a 16-byte block of data in ECB mode using a fixed key, but refuses to reveal its fixed key. In other ...
3k views

### What algorithm could/should be used to encrypt files for storage on untrusted servers?

I need an encryption algorithm that works fast on large files and doesn't increase the file size. It should use a key to encrypt/decrypt data. The files will be sent using REST and over HTTPS, but a ...
173 views

### The security of an encrypt-and-MAC

I would like to know what is the security of an encrypt-and-MAC with different keys for each transaction For example: the one-time-pad with $k_1$ and the HMAC with $k_2$ C = M \oplus k_1\\ MAC = ...
586 views

### Where can I get information on how to implement AES?

I want to write AES from scratch without using the built in libraries of java. I know there are hundreds of AES programs (and websites) out there but I can't seem to find a site that gives me the ...
58 views

### Number of keys when using symmetric and asymmetric encryption?

Quoting part of my homework/assignment: How many keys are required for secure communication among 1000 person if: Symmetric key encryption algorithm is used? Asymmetric key encryption ...
I was wondering if there were any security implications of deriving session keys from a symmetric key using SHA256 in the following manner: $Ks = SHA256(Nonce||K)$, where $Nonce$ is the session ...