All Questions

101 views

What is a fair exchange scheme?

The Wikipedia entry Fair exchange has only two lines, and the only paper I can find describing such a protocol is extremely complicated. Is this a new field in cryptology or can someone give an ...
124 views

Is the DES algorithm in OPENSSL random?

Look at the hex dumps of encrypted1.bin and encrypted2.bin . They both have same password A which was used to encrypt sampletext ...
115 views

Do I need to know the “mode of operation” to decrypt a message encrypted with a block cipher?

If I have received an AES encrypted message, and if I do know the key with which it was encrypted, do I also need to know the mode of operation with which it was encrypted in order to decrypt it? My ...
94 views

Encrypting and Decrypting a 19-digits long BigInteger

How can I take a maximum 19-digits long BigInteger and encrypt it with the following rules: The result must be based on digits and lower-case English letters ...
221 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 ...
135 views

Is solving a modular linear equation a hard problem when the coefficient is not an invertible element?

Assume that we have a linear equation like this: $$ax=b \pmod n$$ when $x$ is the unknown, and $a$ is not an invertible element in $n$. is finding $x$ a hard problem? (by solving I mean finding an ...
155 views

Why nobody considers counter re-keying as a standard Block Cipher Mode?

One of the simplest possible cipher modes is setting each successive key as a function F of the previous one. K[0] = Master key C[i] = E(K[i],P[i]), K[i]=F(K[i-1]) This is similar to the counter ...
226 views

Why are RSA keys encoded with ASN.1 for TLS?

Browser vendors use ASN.1 encoding for RSA certificates in the TLS protocol. RSA public keys are just a number, so why do we need encode them to something else? That increases the risk of security ...
255 views

Bitcoin, couldn't a miner steal money? [closed]

What prevents a miner's block from being accepted across the network if the hash checks out when miner forges transactions in the block? For example, lets say I'm mining and I want to steal money ...
89 views

AES 128bit round level recommendation

we don't want change standard just after every attack, now for AES 128bit blocks i think 16 round is secure, but what is best round amount ? we had attack for 7 round then 10 round and it going so on ...
393 views

Say I have ...
295 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 ...
2k views

What is the best algorithm 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 ...
160 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 ...
231 views

Should I use md5 for my new application?

MD5 is a very fast hash and its output is short and easy to store. Should I use it for my non-security-sensitive application? I don't think so, but I can't seem to convince anyone else that this is ...
430 views

What is the time complexity of the RC4 encryption & decryption algorithms?

I'm trying to figure out what the time complexity of RC4 encryption & decryption algorithms is, in big-O-notation.
174 views

Cryptographically strong pseudo-random seq. generators

If a pseudo-random sequence generator is built so that it uses an n-bit seed and outputs a string that is of length x. Let's say one wants to generate a bit string of length y and uses the previous ...
140 views

BigInteger in Java and Randomness

I'm looking for some PRNGs and as I have been using Java for a long period of time I thought that the BitInteger class together with the Random class could both generate some large pseudo random ...
949 views

Store user passwords in database using Java Application

I want to store user's password details in Database. My project is in Java. I want to know the best way of storing passwords and other important information like user data.
25 views

How do we arrive to the equation for solving D in RSA?

We have been shown that DE is congruent to 1 mod phi(n). How do we arrive to the real equation for figuring out d that is d = e^-1 mod phi(n). I want to know the entire process. I am just curious, ...
120 views

Convert a number to sha-1

I have a task to find a the message for which the SHA-1 hash's last 11 symbols in hexadecimal presentation corresponds to an 11-digit number. I have been given the following example solution: For ...
113 views

Why routers don't just use Diffie-Hellman protocol?

Routers could just use Diffie-Hellman protocol with any computer who tries to connect to that router. Then it would be impossible to eavesdrop for anyone. Only router and computer would know the ...
69 views

Explicit Key SHA-1

I'm reading “Collision-Resistant Hashing? Towards Making UOWHFs Practical” and in the Section 2 it says: Hash functions like MD5 or SHA-1 have no explicit key. But no notion of ...
140 views

HMAC vs Encrypted Hash

What is best to use (for message integrity) between… AES(Data) + HMAC(Data) AES(Data + HMAC(Data)) AES(Data + Hash(Data)) …and why?
55 views

Public Key encryption /Assymetric encryption

For a start, I 've got a question regarding the Public key encryption. I know the public key encryption overcomes the Key distribution issue with the symmetric encryption and that in the case of ...
173 views

Does ssl_rsa_with_rc4_128_md5 have known weaknesses?

My bank's website uses HTTPS with the cipher suite ssl_rsa_with_rc4_128_md5. What are the known weaknesses of this suite? Do they have a practical impact for ...
162 views

If I have the unencrypted text and the encrypted text, can I calculate the key?

If I have the unencrypted text and the encrypted text, can I calculate the key? It seems logical based on my limited knowledge of encryption that I should be able to... but it also seems like too ...
92 views

Consider a secure modern block cipher like AES/Serpent/Twofish. I hear everyone say that the complexity is $2^{128}$ for a 128 block cipher. But isn't the weak link the actual hashed and salted ...
119 views

Serpent block cipher : S0 to S7 functions unclear

I am presently implementing the serpent block cipher in C++ following the specifications. It's important to mention that I'm implementing the cipher in bitslice mode. You'll need the The full ...
104 views

How does an RSA signature look like?

I am using OpenSSL libs to generate signatures. Internally, I learn that a signature is a hash of the message with some padding added to it. I am trying to understand the structure of a signature. If ...
151 views

probability of N hash digits colliding

What is the probability of the first N hash digits colliding? for example i made a script that appends the first 5 digits of the file's sha1 hash to the name of the file. So will the probability of ...
88 views

Why is $g^e \mod p = g^{e \mod (p-1)} \mod p$ if p is prime. I don't get it. It follows from Fermat's little theorem.
125 views

RSA smaller number work-out-by-hand not working - I think I made a mistake

I tried out the paper/pencil explanation @ http://sergematovic.tripod.com/rsa1.html, and it seemed to make sense just fine until I came to decryption. Here is what I worked out: Key Creation: Choose ...
125 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 k1 and the HMAC with k2 ...
765 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 ...
112 views

Is the salt value a secret or can it be stored in cleartext just like the IV? [duplicate]

From Wikipedia I read that the IV is used to randomise the mapping of cleartext to cipher text and that the IV is usually stored (in cleartext) together with the encrypted record. ...
207 views

How is input message for SHA-2 padded?

I read about how is an input message prepared to be hashed by MD4,MD5 or SHA-1: Step1 Append padding bits The input message is "padded" (extended) so that its length (in bits) equals to 448 ...
114 views

Merkle Signature Generation

Section 2 (end of page 42) of *"Post_Quantum_Cryptography.pdf"* says: Then he generates the one-time signature $\sigma_{\text{OTS}}$ of the digest using the $s$-th one-time signature key $X_s$, ...
73 views

Lamport-Diffie + Security Proof

I am studying Lamport-Diffie signature scheme. In the lecture present the algorithm $A'$ for attempting to invert the one way function $f$, where $f$ is used to compute the public key. My question is ...
70 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 ...
148 views

definition and meaning of semantic security

I'm taking coursera cryptography course. The definition of semantic security is hard to understand. I tried to slightly restate it (the word "efficient" was in the original definition). Do I get it ...
63 views

What kind of adversary is a compromised party?

Imagine multiple parties executing a secure multiparty computation protocol to evaluate a function securely. Let Alice be one of the parties who is intended to get all the partial results and combine ...
168 views

Recommended authenticated stream cipher for minimum overhead?

I'm running my TCP/IP protocol secured by encrypting each packet with AES128/CBC, bundling a SHA256 HMAC over that packet. This causes quite a bit of space overhead for small packets, so at first I ...
111 views

The security of the AES secret itself

I am writing an application, running on a server, where multiple users access data from a database which is AES encrypted with a master secret. The master secret itself is initially randomly ...
134 views

Do I need to keep a 64-bit version number secret?

Assume the following structure: version | iv | ciphertext | HMAC(version | iv | ciphertext | ..., key) The version starts out ...
103 views

What key length is required to keep simple keyed “hash” secure?

In a previous question, I described a particular keyed "hash" that mapped a 5-digit input code into a 5-digit output code. It used a 8-bit key which is very insecure - more than 99% of the time, you ...
142 views

Physical Level Encryption

What types of algorithms that are capable of signing a message are out there that run on a physical level, e.g. lacking the infrastructure of a standard PC, no memory, processor or motherboard in the ...
69 views

How to hash a structure that needs to include that hash's outcome?

so I am busy writing a TCP protocol in which I send a "packet header" with each packet of data. This packet header is a structure that contains information about the data that was sent. I want to ...
For primes p and q used to create a keypair, I understand that the following operation is used to create a signature: $M^d (\bmod\ N)$ where d and N have their usual meanings and M is the message. ...