# All Questions

144 views

### What is the most paranoid way to exchange messages? [closed]

I'm looking for a way for Alice to send a message or a file to Bob in the most paranoid way possible (over the internet). It can be asymmetric or symmetric. But According to some articles, AES ...
101 views

I was wondering if hashing a password with the password would be a good way of encrypting the password. So, the user must know his/her password to get the same result as the one in the database. Also, ...
403 views

### Is Encrypt+HMAC stronger than AEAD?

There are a few posts that I've come across that seem to infer that using regular encryption and a MAC might be better than using the newer AEAD (ie: AES/GCM) modes. ...
3k views

I've already sent my correct solution to a programming question on an online class: Let us see what goes wrong when a stream cipher key is used more than once. Below are eleven hex-encoded ...
114 views

### How to generate a key using any m passwords out of total n?

My application requires an AES-256 key K for some secure operation. In order to avoid saving this key in application, I have implemented following scheme: There ...
807 views

### Using CBC with a fixed IV and a random first plaintext block

What if, instead of using CBC mode in the normal way with a random IV, I used this approach: Use a fixed IV (like a block of 0's). Before encrypting, generate a random block and prepend it to the ...
236 views

### Streaming API to authenticated encryption

In regards to NaCl, I asked DJB he had any intent to add a streaming API to an authenticated cipher. His response was obvious in retrospect, that one should never release a decrypted plaintext before ...
151 views

### Understanding padding oracles - is an attack plausible in my scenario?

I have a scheme that, long story short, uses AES in CBC mode to encrypt third-party credentials for user accounts with a password-derived key. It's been mentioned that the use of CBC mode is a ...
145 views

### Does it take brute force to find a pair of plaintext and ciphertext that each follow a certain condition, given an AES encryption key?

Suppose that I have an AES key $K$, and I'm instructed to find a plaintext such that the first 32 bits of the plaintext are some string of bits $S_1$, and the last 32 bits of the ciphertext once the ...
62 views

### Encrypting or HMACing password digests

Assuming I'm using bcrypt to digest passwords, is any additional security gained by either encrypting or HMACing the resulting digests? By requiring a key to compare password hashes, I would expect ...
114 views

### Non-cryptographic hash function as MAC for stream ciphers

I understand that for a stream cipher to be useful, there must be a way to verify that the message was not tampered with (bits were flipped by an attacker). So, instead of using some cryptographic ...
80 views

### Discrete logs on elliptic curve with embedding degree 3 with the 'MOV' attack

The curve $E(\mathbb{F}_{47}):y^2=x^3+x+38$ has order $61$ and $61|47^3-1$ so the embedding degree of $E$ is $3$ and therefore the MOV attack, presumably using some sort of distortion map and a ...
2k views

### SHA-256 and AES-128

Does it make an encrypted string more secure if I use SHA256(x) instead of x as the secret key for AES-128 encryption? I do know that SHA-256 produces 64 characters of hashed string regardless of what ...
65 views

### Two files encrypted with related data versus one file

I have some code that takes a list of credit-card numbers, splits the number into two chunks, one chunk is 8 characters long, the other chunk is the remainder. Each series of chunks is saved into ...
278 views

### How can I calculate the time complexity of modular arithmetic?

I'm doing modular arithmetic in a Java program, and I want to calculate the time complexity of the individual operations. $$c= a · b \bmod n$$ $$m = a^{-1} · b \bmod n$$ How do I get an ...
446 views

### A proof-of-work random number generation system for Pokémon [closed]

(The original question that was here was considered too confusing, unclear, and rambling. You can still view it in the edit history, but the content is no longer useful by itself, and cannot be ...
158 views

### Security for IV in AES-GCM mode

I'd like to use AES-GCM instead of HMAC for authentication and privacy in a token used in a web application, but I'm unsure how to securely tag each token with an IV. Is it safe for me to prepend the ...
101 views

### CBC with fixed IV but changing data [duplicate]

Possible Duplicate: Using CBC with fixed IV I am using AES in CBC mode. For some reasons I have some issues for transmiting the IV. So I am using a fixed IV. If the first 128bits of the ...
3k views

### Where i can find an AES implementation in python?

Where i can find a "reviewed" version of AES implementation in python. Not an API like PyCrypto whereby you can call AES algorithms in a single line.
593 views

### ANSI X9.31 standards for generating random numbers

The NIST-Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using the 3-Key Triple DES and AES Algorithms has 3DES being used three times for each 64-bit block of random data ...
187 views

### How compared encryption algorithm in terms of efficiency

I doing to compare two algorithm cryptography. first algorithm is RSA cryptography and second algorithm is El Gamal elliptic curve cryptography. now I want a way to compare between two algorithm by ...
2k views

### Cryptographic security of PHP mt_rand() function using Mersenne Twister algo

At stackoverflow this question has been asked. It uses additional random entropy and a hash method (among others) to try and create a cryptographically secure pseudo-random number generator for PHP. ...
135 views

### Do Quantum Key Distribution and Physical Unclonable Functions combine, and how?

I see there's a project to combine Quantum Key Distribution, Physical Unclonable Functions, and classical crypto, in order to secure a high speed (100Gb/s) optical link. While there does not seem to ...
95 views

### How does this Cesar Cipher work?

Suppose I have this cryptogram: http://pastebin.com/QpfRMBg1 Clearly it's a Ceasar Cipher which decrypts to: http://pastebin.com/r50heZuU with a simple shift of 10... OKay, no big deal. Let's take a ...
232 views

### How does using salt reduce rainbow table attack?

I could create a rainbow table for a particular salt value and still create a successful attack similar to one without salt value.
140 views

### Is it safe to use RSA as a proof-of-work system?

Suppose I devised the following challenge-response proof-of-work system: A server generates a 2048-bit RSA modulus, and uses the "public" exponent (usually 65537) to sign a random nonce a fixed ...
2k views

### AES CBC mode or AES CTR mode recommended?

what's benefits and disadvantages of CBC vs CTR ? which one is more secure ?
287 views

### estimate of time required to crack sha512crypt password with JtR + OpenCL

OK, I have a shadow file with a password that I know, it is 4 letters followed by two numbers. Using John The Ripper with OpenCL support, on a laptop with AMD Radeon Mobility graphics, how long would ...
865 views

### LFSR for small numbers with large periods

I want to generate a few random numbers using an LFSR. However, the LFSR output depends on the number of taps, so for a large period I use large (relative) number of bits. This causes the numbers to ...
67 views

### elgamal based decryption mixnet

Can anybody help me to understand elgamal based decryption mixnet? Pure elgamal can be used in mixnet (re-encryption mixnet) and its very easy, and I have implemented decryption mixnet using RSA also. ...
2k views

### Difference between Rijndael 128 / 256 blocksize implementations? (and impact of block size in general)

Can anyone shed some light onto the advantages/disadvantages of using Rijndael with 256-bit block size, as opposed to the 128-bit (AES) implementation? (please note: I'm not referring to key-size ...
160 views

### What does modular inversion mean?

I'm trying to implement an e-voting algorithm, which is described at the paper "Internet Voting Protocol Based on Improved Implicit Security" by Abhishek Parakh & Subhash Kak. At the Example 1 ...
453 views

### Cryptographic Protocol using NaCL

Why? I wanted to add some security and privacy to a chat-type server for playing various games (with a few things that are done on the server to limit cheating). Going by the "Don't implement ...
377 views

### Is it safe to use file's hash as IV?

I'm encrypting some files using AES in CBC mode. I'm also using file's digest (SHA-1) to check that data is decrypted correctly (so I need to store it with file). Is it safe to use this digest as ...
129 views

### Two way encryption with random IV

I'm attempting to encrypt some information into our database to be later pulled back out and displayed to the user. Searching and reading up on different methods I found a post over at stack exchanged ...
294 views

### Is the One Time Pad (OTP) considered a cryptographic hash function?

As the title states, would the One Time Pad (OTP) be considered a cryptographic hash function?
190 views

### How do single use passwords work for an encrypted message

LastPass encrypts its data before sending it to their servers. The key for the data is generated using a combination of the master password and username. How then can a one-time password be used to ...
127 views

### Mental Poker with untrusted server (i.e. no peer to peer)

The question of implementing peer to peer mental poker has already been asked on stackoverflow. And there appears to be an implementation called LibTMCG. Also on this site a question was asked about ...
415 views

### Benefit of combining classical substitution ciphers with modern cryptography

I know that a simple monoalphabetic substitution cipher is considered extremely weak, on account of linguistic frequency-analysis attacks. However, assume the following: cleartext is encrypted ...
472 views

921 views

### Why do all SSH-RSA Keys begin with “AAAAB3NzaC1yc”?

My Friend and I have been generating a few ssh2-rsa keys and noticed that all the public keys began with "AAAAB3NzaC1yc". The similarity extended to "AAAAB3NzaC1yc2EAAAABIwAAAQEA" between two keys I ...
171 views

### How secure is the knapsack?

Can the knapsack be used in cryptography in a secure sense (described below)? Knapsack problem: Given some number $X$ and a set $W$ of weights $w_1, w_2, ... w_n$, find a subset $S$ of $W$ (if it ...
224 views

### What is “Blinding” used for in cryptography?

What does "blinding" mean in cryptography, and where do we usually use it? Can you describe a sample implementation?
592 views

### Deriving Keys for Symmetric Encryption and Authentication

So here's the concept. Rather than storing 2 keys and using a random IV, which presents its own problems (key rotation, ensuring no key is used in more than 2^32 cycles, sharing the keys, etc), is it ...
I am doing a course on cryptography on coursera and one of the topics covered was the ElGamal Encryption system. I am using the terms as defined in Wikipedia. Alice publishes $g$ and $g^x$. ...