# All Questions

80 views

### Does a cofactor of an elliptic curve have to be an integer?

What are the implications of a curve having a non-integer co-factor for its generator point? Is that even possible?
165 views

### Encrypting firmware with AES and no IV [closed]

I have an embedded device with a AES CBC engine on it that is used to ensure the integrity of the firmware. I know that CBC mode requires unique IVs to be any good, but I'm unsure if it makes a large ...
155 views

### Certificate signature with SHA-1 and RSA: where do 1888 bits come from?

Plenty of X.509 Certificates use "PKCS#1 SHA1 with RSA encryption" as the Certificate Signature Algorithm for generating a 2048-bit signature. The SHA-1 hash function generates a hash value of 160 ...
183 views

### Hash 22 byte secret into 512 bit hash: Full entropy?

Does it make sense to hash a 22 byte secret (which may not have full entropy since it is chosen by the user) into a 512 bit hash (using Keccak-512)? More precisely, will the 512 bit hash have full ...
116 views

### Decryption honeypots

When performing a key search, I've always wondered how you reliably detect a successful decryption once you hit the right key. I assume that you have to analyze the data and look for patterns: words, ...
319 views

### Where is my private key stored when I communicate to a website that uses SSL/TLS?

If I communicate with a website that uses SSL/TLS, my browser will generate a private key. Would the browser store that key on the hard disk or would store just it in the RAM?
171 views

### Pollard’s Rho Method

I can't get my head around Pollard’s Rho Method for solving discrate log problem I have read in a book: The basic idea is to pseudorandomly generate group elements of the form α^i · β^j ...
159 views

### Outsourcing arbitrary computations securely

Consider the following scheme. Alice wants Bob to make some computations for her, but she doesn't want to reveal the data on which he's going to do it. So, she encrypts the data, sends them to Bob, he ...
749 views

### OpenSSL PBKDF2 documentation

I'm using OpenSSL 0.9.8 on OSX Maverick, and I want to use a PBKDF but I can't find any doc/man about it on OpenSSL's website. I'm working on QCA, an OpenSSL wrapper for Qt, and when I arrived there ...
98 views

### Encrypted query parameters via HMAC

I have an unsubscribe link, which needs to be passed a customer id, and a product id, producing a query string something like: ?cid=100&pid=2 I would like to ...
99 views

### How to design a secure data container?

I want to design a secure data container that can be used to transfer encrypted data over a public network that can defeat common attacks. Data is already encrypted before entering this container so ...
99 views

### Are there any practical examples of breaking a system using linear attacks?

I've read some papers about linear cryptanalysis. But since I am going to give a lecture about it I am looking for an example of breaking a system using this attack. Is there such an example ...
158 views

### What is the intuition behind AES or SPN?

I'm new to cryptography and have just encountered AES and SPN. I would like to know how the S-box, permutation step and the MixColumn step help improve security. It seems to me (perhaps mistakenly) ...
102 views

### Is there a developer's resource that ties encryption methods and strengths to the appropriate usage scenarios?

I'm not looking necessarily for implementations in any language (although it would help to list those resources as well), but what I am most interested in is a discussion of what advantages and ...
428 views

### RSA Decryption with Private Key but no public exponent

I manually set the RSA private key, given the private exponent and modulus. When I use this key to decrypt a message encrypted using a public key (also set with public exponent and modulus) seems to ...
2k views

### How to decode an OTP message?

First off, I'm extremely sorry if this comes off as a "homework dump", but to clarify, it isn't. I don't want the answer, I want to know how to get to the answer. My cryptography professor gave us an ...
155 views

### Does CBC encryption of a hash provide authenticity?

Given a message $M$ and a cryptographic hash function $H$, let $f(M) = E_K(M || H(M))$ where $E_K$ is AES-128-CBC encryption with PKCS#5 padding. Take $H = \textrm{SHA-256}$ if it matters. In other ...
5k views

### What is the “shared secret” used for in IPSec VPN?

Can somebody explain what the "shared secret" and "password" do when opening/creating a VPN tunnel? In this specific case I setup a VPN to my Fritz!Box and I had to provide a shared secret (which was ...
281 views

### Is it possible to subtract/multiply numbers using homomorphic encryption?

Most of the libraries I've seen allow you to add encrypted numbers. Is it possible to subtract and multiply them?
141 views

### Why we must hash lot of times in rainbow tables?

i dont get the utility to chain and reduce in generating rainbow tables. Hash function is made to not have collisions, or at least chain only 2 times so we dont return to the concept of the hash ...
189 views

Why do people say that using hash twice or more is bad? yes there is key derivation that do that job, but in a low bandwidth network countries, the solution i see is to use a simple hashing system on ...
136 views

### Is there a problem with this non-ECDSA message signing?

Is there a problem with signing a message like this? ...
81 views

### Lamport-Diffie + attempting to invert OWF

I am studying Lamport-Diffie signature scheme and in my lecture present the follow algorithm for attempting to invert the one way function $f$, where $f$ is used to compute the public key of this ...
284 views

### Secure use-cases of block cipher with 64-bit block size

In what cases can we use a weak block cipher like DES ? More precisely, Are there specific situation in which a weaken block cipher can still be used, for instance for certain types of plaintext ?
249 views

### Solving a discrete logarithm using GDlog

I am trying to calculate an $x$, such that $t = g^x \pmod p$ in order to crack a weak ElGamal encryption for university. I found GDlog, but I cant figure out how I can use the input to calculate my ...
591 views

### Implementing secret reconstruction in Shamir's Secret Sharing

I am trying to implement Shamir's secret sharing in C++. I have got the generation of shares working. However, I am very confused with the reconstruction of shares. I get the part on how three users ...
96 views

### Pseudo Random Generator (PRG) from Rabin function

I'm trying to make a PRG using the Rabin function. The code (in Java) I wrote to implement the function is: ...
138 views

### Given a certain entrophy per character, how long should a passphrase be to guarantee key strength?

Given an entrophy of 1.5 bits per character, how long does a passphrase have the be to guarantee a key strength of a 128 bit random key? Assuming an alphabet of 26, one character takes log2(26)=4.7 ...
521 views

### What's the difference between Trapdoor Functions and Encryption Functions?

From Wikipedia: A trapdoor function is a function that is easy to compute in one direction, yet believed to be difficult to compute in the opposite direction (finding its inverse) without ...
471 views

### Brute forcing an HMAC

Given current technology such as GPUs and GPU cracking software I was wondering if anyone has an idea on how long it would take to brute force the key used to derive an HMAC?
326 views

### Possibility of factorisation of rsa modulus due to vulnerability in java implementation code

Below is my implementation of the RSA algorithm. Actually I'm choosing the private key (d) instead of public key (e) and computing the public key.It is working fine but I want to know if this is a ...
810 views

### Which one is fastest? Karatsuba or Montgomery multiplication?

Is there any complexity analysis between Karatsuba and Montgomery multiplication algorithms? It seems that Karatsuba is more general in the sense that is not modulo tuned while Montgomery it is. Does ...
208 views

### How to generate a random polynomial of degree $m$?

I am trying to do a homework in which implement a variation of this paper and I don't know how to generate a polynomial of degree $m-1$. This polynomial is used to generate the $y_0$ and $y_1$ values. ...
132 views

### How can encryption software accept password lengths which are not one of the AES key lengths?

AES comes with key sizes of 128, 192, and 256 bit. But in Truecrypt or other crypto software we can use passwords of different length, even less than 128 bit or more than 256 bit. How is this ...
1k views

### Double Encrypting with two different keys

In terms of security, would it be MORE or LESS secure to take, say, an RC4 output (or Serpent) or other, that is encrypted with one key, and to encrypt that output with AES (using a different key)? ...
532 views

Say I have ...
298 views

### Are really, really long passwords any securer than short ones?

Just for fun, I want to encrypt a message that will take about 10 or so years to decrypt. My idea is to encrypt a message with AES-512 with a password one million decimal digits long. Knowing not ...
190 views

### Does RSA-OEAP have integrity and authenticity properties?

RSA-OAEP is IND-CCA2 secure (indistinguishable under an adaptive chosen ciphertext attack). Does it also have the INT-CTXT (integrity of ciphertext) and INT-PTXT (integrity of plaintext) properties? ...
175 views

### Pseudorandom generator and AE-secure encryption

How would you answer the following question (I have to translate it from German): The existence of a pseudorandom generator implies the existence of a AE-Secure encryption scheme (AE = ...
952 views

### How easily could this be cracked?

I'm looking into encrypting files like this: First, I SHA-1 hash the password. Let's say the password is something normal like "hello123", and then hashed. Then I encrypt a file using this: ...
337 views

### Key Scheduling of International Data Encryption Algorithm (IDEA)

How to perform the key scheduling in International Data Encryption Algorithm (IDEA), I took a research but I can't understand how to perform it, "further groups of eight keys are created by rotating ...
683 views

### Traditional DES scheme in Unix crypt function

In a security context course, we need to reproduce the old DES hashing scheme in the crypt program, on an old unix system. I am actually reading the crypt page on wikipedia: The traditional ...
143 views

### RSA encryption input range - plaintexts that map to ciphertexts?

According to the wiki article on the RSA encryption function, the valid range of input $m$ is $0 \leq m \lt n$. However I have found that the following values of $m$ always return themselves when ...
464 views

### Cryptanalysis of S-DES - Equations

I am trying to derive equations for s and t in the cryptanalysis of a Simple DES algorithm, but I haven't been able to deduce ...
220 views

### How do I calculate the maximum plain text length allowable for a certain cipher text length?

I am encrypting and storing sensitive values in the database. I have a set max length in the database, but in order to provide useful user feedback, I'd like to know the max input I should allow for a ...
184 views

### Is stretching hash several times basically the same as bcrypt?

As I understand it, the main advantage of bcrypt is stretching so it becomes slower to crack overtime. But, is using a "good enough" algorithm (e.g., SHA-2 family) then stretching until it's slow ...
107 views

### MISTY1 Implementation error

I am trying to implement MISTY1. It's RFC, RFC2994, contains psuedocode that I basically copy and pasted into Code::Blocks. However, I managed to mess that up somehow. After 2 days, I still have not ...
686 views

### AES-CMAC passes every test except two

i wrote this code: ...