# All Questions

224 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 ...
210 views

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

Is there a problem with signing a message like this? ...
103 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 ...
376 views

### How to verify a shared secret using only AES?

I have two devices that need to verify that they both are in possesion of the same secret key. One of the devices is a very limited embedded device that only has AES128 available, no SHA or other hash ...
372 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 ...
677 views

### Is this scheme a provably fair random number generation?

I have thought up a method for generating random numbers between a client and a server which I hope is fair: The client and server decide on a range in advance, $0$ trough $n-1$. The server ...
3k views

### decryption many time pad [duplicate]

I have eleven ciphertexts that were encrypted with the same key (which I don't know). I want to decrypt the last ciphertext. I read similar question like Many time pad attack but I can't solve my ...
139 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: ...
172 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 ...
985 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 ...
641 views

### How to make a message into a polynomial on NTRU encryption?

How to make a message into a polynomial on NTRU encryption? for example how we can conver 'hello world' to polynomial... i have read the converting operation on IEEE Std 1363.1- 2008, but i can't ...
614 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 ...
610 views

### How many oracle calls to break an affine cipher in a chosen plaintext attack?

Assuming the ability to launch Chosen Plaintext Attacks (CPA), how many oracle calls does an attacker need to break the affine cipher? How does it work?
498 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. ...
2k views

### ECDH VS. DH benchmarking in JAVA

So basically my problem is the odd result i get when measuring the time it takes to generate a ECDH key in java vs. the time it takes to generate a DH key. I compare the time it takes to generate: ...
203 views

### Where can I learn basic cryptography to know more about passwords and Bitcoin?

Basically my knowledge in passwords consist of setting up a Diceware master password back then, and I know hashes are not convertible back to the original password. Some basic question I want to know ...
99 views

### Tweaking textbook RSA to make the encryption a Pseudorandom function

Lets say I want to tweak/alter the textbook RSA encryption function to create a pseudorandom function by pre-processing the input. Suppose I do something simple like add 2 to the input before ...
445 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 ...
5k views

### RSA 4096 bit key benchmark

How can I benchmark RSA operations on my computer? I want to know about 4096-bit long keys on general computers. How many encryptions and decryptions are possible per second? All benchmarks I found ...
454 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? ...
217 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 = ...
498 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

### 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 ...
185 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 ...
655 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 ...
534 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 ...
249 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 ...
153 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 ...
1k views

### AES-CMAC passes every test except two

i wrote this code: ...
239 views

### Looking for cipher that uses one ciphertext

I'm new to Cryptography so please free to edit my question for clarity and add the appropriate tag. I'm trying to research if the following is possible. Suppose John has a message that he ...
167 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 ...
838 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.
1k views

### Can md5 be used for encrypting data?

I know that md5 shouldn't be used for password hashing because of collisions and possibility of making dictionary attacks e.g. using rainbow tables. But what about ...
8k views

### c# Correct Triple Des Block Encryption Usage

I found the below code online, but in its original state, the encryption was not using any padding (Padding.None), and was encrypting in blocks of 8. I wasn't able to get this code to properly encrypt ...
31 views

I have a cryptosystem that I'm using for secure chat. It is using AES 256 (with RSA 2048 for key exchange). Would a predictable, and repetitively sent ciphertext plaintext compromise the ...
55 views

### Safe MD5 digest

So I've heard that MD5 is broken because it's possible to engineer collisions. So instead we should use, say, SHA256. The problem which SHA256 digests is that they are long. So I've come up with this: ...
59 views

### Does sending the same message with 2 different keys in OTP leak information?

Suppose a common message ($M$) is XOR'ed with two different keys $K_1,K_2$ producing two ciphertexts $C_1,C_2$. Thus, $$M \oplus K_1 = C_1\\ M \oplus K_2 = C_2$$ On observing $C_1$ and $C_2$, an ...
50 views

### Converting a 5-bit s-box to its bit-sliced format

I'm currently trying to convert a 5-bit sbox (the one from this cipher: http://primates.ae/wp-content/uploads/primatesv1.02.pdf) to its bit-sliced format (i.e. to a boolean network). Most papers ...
72 views

### Multilinear Pairing in Cryptography

I want to create 2 Bilinear Pairing $e_1$,$e_2$ such that $$e_1:G_0 \times G_0 \rightarrow G_1$$ $$e_2:G_1 \times G_1 \rightarrow G_T$$ and use this to encrypt a message $M$ in the form M ...
44 views

### Tackling encryption problems with “Zipf's law”?

I am new to cryptography and was wondering if it would be possible to semi-reliably "decrypt" an encrypted message by using the statistical distribution of symbols (/letters/numbers) in the encrypted ...
63 views

### what is meaning of operator “ := ” in cryptography?

I've seen := used in several cryptography papers where the this symbol has been used instead of assignment operator ($\leftarrow$ ) or equal sign (=), but never with an accompanying explanation. ...
68 views

### Analysis of DGHV Security

I want to know how security of DGHV can be breached using oracle and Binary GCD. As I study this paper : Fully Homomorphic Encryption over the Integers But I am not able to understand Section 4.1: ...
132 views

### Is Threefish the only cipher with 1024 bits of security?

Threefish has up to a massive 1024 bits of security. Is it the only cipher with such overkill security?
107 views

### Understanding Hash function notations

I am implementing a Certificateless Cryptography Algorithm by referencing the paper An Efficient Certificateless Encryption for Secure Data Sharing in Public Clouds. In this paper on page no. 4 during ...
82 views

### Block cipher block and key sizes

Is there any point in making block size less than key size in block cipher? For example, Russian GOST symmetric cipher uses 256-bit keys to encrypt 64-bit blocks. That means there are many keys which ...
238 views

### Do I need to use a MAC with asymmetric encryption?

The internet has drilled into me that when I delivery any symmetrically encrypted data, I should also deliver a MAC to authenticate it before any decryption occurs. Do I also need to do this if I use ...
55 views

### What is the advantage of Pseudosquare?

Pseudosquares ,which are not square but Jacobi symbol are still 1, are used in some cryptographic algorithm. What is the advantage of them over the exact squares? If we used squares instead of ...
61 views

### What are the possible security issues when exporting a plaintext database to a file like this?

Say I have plaintext database with key-value pairs of usernames and passwords. Then I iterate through the database, encrypt the passwords, and write the username and encrypted password pairs to file ...
### multiplicative inverse in galois field $2^8$
I am trying to compute the multiplicative inverse in galois field $2^8$.The question is to find the multiplicative inverse of the polynomial $x^5+x^4+x^3$ in galois field $2^8$ with the irreducible ...
I know that the ChaCha20 core (without the initial constant) is not an ideal PRP and must not be used as such. I also know that $\text{ChaChaCore}(0) = 0$. Are there any other differences?