# All Questions

12 views

### Consider a uniquely decipherable code on an alphabet that is neither prefix-free nor suffix-free. What would an example of this code be?

I found an example that translates to considering the alphabet A = {a, b, c, d}, with p(a) = .2, p(b) = .3, p(c) = .4, p(d) = .1. Also, a = 01, b = 10, c = 011, d = 110. But when I look at the ...
23 views

### Where to Start?

I am trying to learn about Attribute Based Encryption for research. I have been coming across some strange terms such as the Bilinear Diffie-Hellman Assumptions, Selective-ID Model, Monotone Access ...
6 views

### A bit different question. Could anybody help me understand how Hagelin Machines worked algorithmically? [on hold]

I have read a lot of websites, but none of them gave me a reasonable answer. They are not specific enough for me. I understand how Enigma works and that's it. Now I would like to program something on ...
11 views

### Scale-Invariant DGHV Scheme - Decryption

I have just started reading the Scale-Invariant Fully Homomorphic Encryption over the Integers paper and I'm a bit confused about something: When decrypting the ciphertext: ...
19 views

### How to clock a linear feedback shift register?

I have some trouble to understand what happends when a LFSR is clocked. I have tried many examples but I do not get it correct, so if anyone can point out my errors I would be happy! I have the ...
40 views

### How hard to solve the given mod problem

Let c = a.b mod p where p is n bit prime number (e.g. 128 or 160 bit prime number); a - random number between 1 and (p-1); b - random number between 1 and (p-1); Given c, a and p, how hard to ...
19 views

### Retrieve something from a PNG image + a key? [on hold]

I am trying to improve my knowledge in steganography and cryptography. I have a .png image which can be opened by any image viewer software. However, there is a ...
21 views

### Is there some prefix random padding scheme?

Is there a standardized padding scheme which is prefix instead of postfix and that uses random bytes except for the first byte which would be the length of the padding?
25 views

### Is there any benefit of changing the AES-CCM encryption key periodically even if the Nonce space is not exhausted yet?

I would like an answer that could be sustained by a mathematical proof. Let's say I'm using AES-CCM to encrypt a lot of messages, and I always use a different nonce. I know that when the nonce space ...
25 views

### Should the signature be prefix or postfix to the message in the sign-then-encrypt scheme?

Let's assume we have a message M and it's signature S and that | is the concatenation operator. Should we encrypt S|M or M|S ? Does it even matter ?
39 views

### How can I turn this cipher into a perfect cipher by altering only its encryption algorithm?

Given a toy cipher that picks a key, k, from the key space of {00,01,10} and a message,m, from the same set {00,01,10} and encrypts using E = m ⊕ k. How can I change the encryption function E in ...
63 views

### What is required to decrypt an encrypted file?

At the risk of sounding stupid and being laughed at...I must ask this question. What is required to decrypt an encrypted file? Obviously you need the appropriate key to decrypt, but is any other ...
40 views

### The benefit of PBKDF2 for big keyfile?

The man page of cryptsetup says: Whenever a passphrase is added to a LUKS header (luksAddKey, luksFormat), the user may specify how much the time the passphrase processing should consume. The ...
86 views

### Given a linear block-cipher,how can an attacker decrypt any plaintext value encrypted,using 128 chosen ciphertexts

Given the linear block cipher $LinearCipher(k, p) = c$ $$LinearCipher(k, p_1 \oplus p_2) = LinearCipher(k, p_1) \oplus LinearCipher(k, p_2)$$ where $k$ and $p$ are 128-bits. If an attacker uses a ...
19 views

### Raw /dev/random output for keymat [duplicate]

Noob question: It is my understanding that the raw output from non-blocking /dev/random (where the kernel's entropy_avail estimate is equal to or greater than the number of random bits required) ...
87 views

### Very short signatures? (eg: 48bits?)

Our application requires some 'mild' form of 'proof of origin' for the tokens we issue (~200 bytes), however, the value of each is trivial. The requirement is to provide 'tamper resistance' rather ...
92 views

### ECDH or RSA more secure for symmetric key wrapping?

Suppose a message is encrypted with a symmetric block cipher with a random key. RSA is often used to wrap the symmetric key using the recipient's public key. In this case, the size of the message is ...
32 views

### Does a padding oracle have the encryption key? Where in real life do I see such an oracle?

So after some searching, I kinda know the attack procedure of altering bit by bit. But I'm still confused how this is possible. If I understand it correctly, the attacker never has the key, or tries ...
13 views

### Software tool for practical XOR comparisons (ASCII and HEX) [migrated]

A quiz 2 weeks ago on UMCP's Coursera cryptography course had us use (and break) a modified Vigenere cipher wherein ASCII characters where XOR'ed against a Hex secret key to create the cipher text. ...
19 views

### Why many passes at file removal? [on hold]

Why file removal tools offer gost 2 passes and British 3 passes or even gutman 35 passes options? In which case the single pseudo random pass is not enough?
23 views

### Using a product of a series of curve25519 scalars as a private key

There are a few systems like the GNU Name System and the Sphinx mixnet packet format that employ a series of curve25519 scalars all multiplied together as a private key. Are there any caveats to ...
12 views

### Protect secret key on sender [migrated]

Context In our game company we're choosing between different leaderboard service providers and I'm trying to decide if using one of them with a set structure will be "safe-enough". I understand that ...
17 views

### Multiply two large prime numbers using gmp [on hold]

I have a list of prime numbers in a file say 2,3,5,7,11,13,etc etc upto a larger number... I have to multiply these primes to get N (RSA algorithm).. say 2*2, 2*3, ...
755 views

### For any hash value, is there an infinite number of inputs that hash to it?

Bruce Schneier writes (back in 2005) in a post on cryptanalysis of SHA-1: SHA-1 produces a 160-bit hash. That is, every message hashes down to a 160-bit number. Given that there are an ...
39 views

### Testing hash functions for collision resistance

I was hoping to implement a software that allows testing a user-defined hash function for cryptographic properties (Meant to pique interest in cryptographic hash function for a school showcase), as ...
63 views

### MD5 Collision Attack Explained

In one of my assignments, I came across this line Due to MD5’s length-extension behavior, we can append any suffix to both messages and know that the longer messages will also collide. This lets ...
16 views

### Encoding scalar values to points on Ed25519

I'm interested exploring key derivation and threshold signature protocol that require point arithmetic (addition) on the private scalar values and $S$ values of the signatures in ed25519. ...
52 views

### Weakness of SRP after server compromise

From SRP section 3: The host stores user passwords as triplets of the form { <username>, <password verifier>, <salt> } Password entries ...
56 views

### Weaknesses of RFC6628

In RFC6628 section 2.2, they say: w = The password remembered by the user. W = The password verifier registered in the ...
60 views

### About end to end algorithm SMS from Jo Mehmet Sollihagen Øztarman

This is a signcryption scheme from End-to-End Data Protection of SMS Messages by Jo Mehmet Sollihagen Øztarman (pdf, section 4.3.1): Public parameters C: an elliptic curve over GF(ph) with p ≥ ...
121 views

### Is it possible to find a Mersenne Twister seed given only the first output?

Suppose I have a Mersenne Twister seeded with some unknown value, and I’ve been given the first output. Given only this first output, and no other information, is it possible to derive the unknown ...
46 views

### Can homomorphic decryption of DES be practical?

I was reading this paper https://eprint.iacr.org/2012/099.pdf when I thought if something similar can be done with DES or 3DES, e.g. it is plausible to decrypt DES homomorphically ?
52 views

### Effect of message length on collision attacks

I know that message collisions are supposed to be hard to calculate for a good cryptographic hash. Given 1k worth of data, it's hard to find another 1k worth of data that collides with the same hash. ...
23 views

### Help me solve this one! [on hold]

I have this text: xcy.nf/1TF58H4 I already know that the "xcy.nf" part is equals to "bit.ly". I didn't discovered it, it was given, as a tip. I can't figure out the rest. It is supposed to ...
50 views

### What is the complexity of finding SHA-1 collisions?

Given the recent news about SHA-1 collisions, what is the complexity of finding a SHA-1 collision? Marc Steven's HashClash is still detailing about 260. Does the previous complexity still hold?
40 views

### Are HTTPS web sessions non-repudiable?

(This is probably a basic question, and may be a duplicate; if so, just let me know.) Suppose there are two clients A and B, ...
162 views

### Can an ephemeral RSA key give forward secrecy?

Suppose party A generates an ephemeral RSA key and sends the public key to B. Party B then generates a symmetric key, encrypts it with Party A's public key and sends the Ciphertext to Party A. Party ...
56 views

### Avalanche effect sample size

With a fixed key size – key has 128 bits, while block size is 8 byte – how do I calculate how many different keys and texts I have to test for an cryptanalytic statistics study? Differently worded: ...
21 views

### Simple way to sha256 using CUDA? [on hold]

I'm trying to do some hashing acceleration, but I'm not sure where to start. there's not really any open source simple implementations of sha256 for CUDA. Could give me a step in the right direction ...
64 views

### Are there full cycle cryptographic/one-way hash primitives?

I'm looking for behavior similiar to that of LCGs, (i.e. input and output sizes are same). Full cycle of $2^{32}$ different inputs generates full cycle of $2^{32}$ different outputs, distribution of ...
45 views

### Inverting One-Way Functions

One of the conditions that a one-way function has to satisfy is the following: $$Pr[A(f(x))\in f^{-1}(f(x))] \leq negl(n)$$ Now, suppose that we have the following function that's not one way: ...
68 views

### Encrypt hash using hash of hash?

I wonder what is wrong with this scheme for authentication. Server sends random challenge, C Client returns (C, B(P)) encrypted in H(B(P)) where B(P) is high work factor salted hash of the user ...
25 views

### Hash regex for malware recognition [on hold]

I'm looking to store two types of hashes for recognizing blacklisted code. These are the FireEye "import hash" (or imphash) and the ssdeep "fuzzy hash". Is there a regex (or formal documentation) I ...
17 views

### In which ways one can prevent key substitution attack

For Diffie-Hellman two parties need to exchange their public keys. Which ways are known to prevent key substitution at this stage? Those I know of so far: Certificate Authority (single third ...
27 views

### What is the notion of an interactive assumption?

In this paper: Sequential Aggregate Signatures with Short Public Keys: Design, Analysis and Implementation Studies the authors sell the paper as the first who propose Aggregate signatures without ...
17 views

### Implementing Oblivious Transfer protocols [on hold]

I have to implement a series of Oblivious Transfer and Oblivious Transfer Extension protocols for my MSc thesis. My goal is to implement the various protocols and compare them in terms of speed and ...
17 views

I am using the javax.crypto.Cipher in Java to do AES/CBC/PKCS5Padding encryption. What I am observing is that, if you try to encrypt a Plaintext with no padding, PKCS5 adds another entire block just ...
168 views

### How to protect key in software

I need to encrypt/decrypt data from my software by AES, the problem is how to make the AES key secure, there is no HSM, should I hard code the key in my code? It seems that a hacker can read the key ...