# Tagged Questions

Encryption is the process of transforming plaintext using a cipher into ciphertext to make it unreadable to anyone except those possessing the key. Decryption is the process of transforming that ciphertext back into plaintext, using the key.

73 views

### Secure Channel - Encryption and Decryption Keys For A Message

I'm currently reading Cryptography Engineering and in Chapter 7, the topic of secure channel is discussed. The channel described is using CTR for encryption. Below I include images with pseudo-code ...
168 views

### How to decrypt a PGP message with only the two primes and the public exponent?

I'm trying to decrypt a PGP Message that is encrypted with an RSA key, but I only have this information: Public exponent: 65537 Prime 1: ...
114 views

### Can AES be considered as Perfectly Secure?

I am studying about the AES encryption standard, and as I know from the theory there is no known weaknesses today about this block-cipher. I would like to find out or at least to understand what ...
70 views

### Is there a mental poker algorithm that does not rely on commutative encryption?

The algorithm for mental poker that I saw on Wikipedia and everywhere else relies on an encryption algorithm such that $E_k(E_j(P)) = E_j(E_k(P))$, but I can't find a modern and secure algorithm for ...
2k views

### How to attack a classical cipher using known partial plaintext?

I have a ciphertext generated by a classical cipher. I do not know what was cipher used to generate it. I do however have the beginning of the plaintext. What are the cryptanalysis approaches for ...
3k views

### Is it possible to make time-locked encrytion algorithm?

I'm not sure if what I'm asking is even a valid question but here goes. Would it be possible to add a mechanism to an encryption algorithm that would mean it had to be a certain time of the day or a ...
127 views

### RSA public key exponent generation confusion

Quote from Wiki: $e$ having a short bit-length and small Hamming weight results in more efficient encryption — most commonly $2^{16} + 1 = 65537$. However, much smaller values of $e$ (such as $3$) ...
163 views

### Elliptic Curve Cryptography Encryption and text representation implementation

I'm writing a coursework and right now I've implemented the ECDSA algorithm, but I also need to encrypt and decrypt small text files (.txt) using elliptic curve cryptography. The problem is that I do ...
253 views

### P10 to P8 in S-DES

I am new to cryptography. During my learning I am facing a problem with S-DES. I am confused where P10 to P8 come from, and I’m ...
46 views

### prepaid meters that rely on a disconnected system

i have some experience with cryptography in the banking sectors, mostly in block ciphers like DES 3DES etc. im interested in prepaid electricity meters as it is a number that is generated from a ...
176 views

### Building a combined encryption scheme from two encryption schemes that's secure if at least on of them is secure

Any thoughts on how this can be done? Let $\Pi_1 = (\mathrm{Gen}_1, \mathrm{Enc}_1, \mathrm{Dec}_1)$ and $\Pi_2 = (\mathrm{Gen}_2, \mathrm{Enc}_2, \mathrm{Dec}_2)$ be two encryption schemes for ...
201 views

### Is One Time Pad considered Chosen-Plaintext Attack Secure?

If we're considering Chosen-Plaintext Attack setting, then the adversary has access to the Encryption Oracle right, and we know that OTP is only considered secure if we use the key only once. How ...
22 views

### Is sending encrypted message and signed message a secure way of transmitting data? [duplicate]

I know that the industrial standard is normally sending data in the following format: Send Encr(msg, Sign(msg)) Is the following way a secure as well? ...
33 views

### Does failure of indistinguishability of encryptions imply lack of CPA-security?

Suppose we have an encryption scheme that fails the indistinguishability of encryptions test. That is, given messages $m_0, m_1$ and a ciphertext $c_b = Enc_k(m_b)$, where $b \in \{0, 1\}$, the ...
49 views

### On composition of encryption schemes

If we composed (as in function composition) multiple CPA-secure encryption schemes would the result also be CPA-secure?
180 views

### Generate a list of valid ASCII codes

I have read many pages about encryption but I am really stuck on this. For access control to a building I want to print a 10 character ASCII code on a ticket (as a barcode). The barcode reader ...
36 views

### Proposed unidirectional authentication scheme

I've been looking around for a way to authenticate a client to the server and deliver a message, but in a unidirectional fashion - that is, the client sends messages to the server, but the server ...
49 views

### Does the plaintext have to be at least as long as the key in Polyalphabetic substituion cipher

In polyalphabetic substitution cipher, if we have a key $k$ (a string of letters) of length $n$ does the plaintext $m$ (also a string of letters) have to satisfy $|m| \geq n$? Also, side question, ...
104 views

### How do we guarantee plaintext is coprime in RSA?

The specifications for RSA state: $P^{\phi(N)} \equiv 1 ~mod~N$ if and only if $P$ and $N$ are coprime. Here $P$ is the plaintext and $N$ is the product of two suitable primes $x_1, x_2$. My question ...
145 views

### Why cant Public Key Encryption be perfectly secure? [duplicate]

I would be very grateful for any help. I cant figure out why (probabilistic) public key encryption schemes can never provide perfect secrecy? Any Ideas? Excerpt: In contrast to the private-key ...
591 views

### Computing p and q from private key

We are given n (public modulus) where n=pq and e (encryption exponent). Then I was able to crack the private key d, using Wieners attack. So now, I have (n,e,d). My question is, is there a way to ...
84 views

### Is the “Matryoshka Cipher” possible to write and implement?

Named after the Russian nesting dolls (a physical representation of the hidden data and the layers of encryption surrounding it) one example of the Matryoshka cipher would be the "Zvyozdochkin set" ...
63 views

### Avoiding known plaintext attacks with an additional XOR-Layer

Can a cipher that is vulnerable to an known plaintext attack be made secure by adding an additional XOR-encryption? That is: suppose I have an (w.l.o.g. symmetric) encryption algorithm E were the ...
61 views

### with RSA encryption, how do I find the md5sum of the private key from the public key?

This is a purely mathematical question on RSA encryption. Having $e$ as the public key exponent and $n$ the modulus of a public key. Can I recover the md5sum of the private key $d$ (inverse of $d$ ...
7k views

### What is the main difference between a key, an IV and a nonce?

What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their ...
40 views

### Segmenting encryption to get the same results with the same key

The given examples below are dummy and in English. They are mainly for place holding as this is a concept question rather specific example based Given AES has a block size of 128 bit (16 letters of ...
69 views

### Turning data into seemingly random noise

I am currently working on a python script that does image steganography, altering the least significant bit on each channel of the image. Now imagine encrypting a file with a bunch of null bytes, or ...
435 views

### At what point can you you implement crypto algorithms?

First off, this feels like it should be a common question, so I'm sorry if I've missed an older thread. Note that in my question, I'm talking about "implementing AES" rather than "designing AES2" or ...
68 views

### If someone had a list of all primes, would it be possible for them to factor any integer in polynomial time? [duplicate]

For example, if they somehow got a function that would churn out any arbitrary amount of primes in a row. Could they break the RSA problem then?
79 views

### Algorithm for n-of-m keys with partial results

Is there any known and proven algorithm which allows n-of-m keys en/decryption, but doesn't require the keys to be in one location? That is, it allows the plaintext (or ciphertext) to be encrypted (or ...
175 views

### Is encryption time greater than decryption time?

Is encryption time always greater than decryption time for all encryption techniques (AES / DES / RSA / DNA), or is there a mistake somewhere in my implementation?
93 views

### How difficult is homomorphic encryption? [closed]

I want to learn more about homomorphic encryption and eventually make a career from it. Currently, I'm thinking to have my bachelor degree in this field. What background should I have for this ? How ...
62 views

### Energy necessary for brute-forcing or decryption

I am trying to understand how the physical limits of computation apply to crytography, and came up with the scenario below as a sort of gedanken. I would be grateful to see how others answer it. ...
106 views

### Can I use the output from a DRBG directly as K for AES, or do I need to use a key generator algorithm?

NIST has 3 validated "Recommendation for Random Number Generation Using Deterministic Random Bit Generators" (DRBG's) that are based on NIST SP 800-90A: Hash_DRBG (based on hash functions) ...
56 views

### Can Winternitz be easily converted to a many-time encryption scheme?

The Winternitz scheme is typically cited as being an OTS scheme. Can it also be used as a one-time encryption scheme? If it can be used as a one-time encryption scheme, then is it possible to easily ...
71 views

### Reducing the keyspace for a brute force attack on a chained 64-bit xor

I have a block of data which I know is encrypted using a chained 64-bit xor (sorry if that makes no sense, I'm not familiar with crypto lingo). I know a little bit about what the plaintext should look ...
63 views

### Adding a Random component to CBC MAC in order to enlarge the tag space

CBC MAC that is using AES as the underlying block cipher, has tag space of 2^128. If we add a random single block, concatenating it with the tag, and encrypt it again in AES CBC mode, with additional ...
137 views

### Encryption of plain text using stream cipher algorithm

We know that in stream cipher algorithms plain text and generated key are Xored byte by byte. Generated key depends on how much plain text there is and on that basis key will generate and plain text ...
69 views

### Is a padding oracle attack possible if data is only encrypted internally on a server (e.g. for storage)?

I read something about the padding oracle attack when analysing the use of an AES-encryption of data in a database and was "scared" it could be a serious issue. But after investigating a bit further, ...
203 views

### How does ROTL work?

what does ROTL stand for? I know it does left shifting but what about the acronym? When we do a left shift, do we take the leftmost bit and add it at the end, by making the second bit the first, and ...
21 views

### Key iteration count while using random keyfile larger than master key

If I were to have a 4096-bit file of random data (/dev/random) used as a keyfile for LUKS, would there be any benefit to having a key iteration count higher than 1? My reasoning is that the attacker ...
20k views

### Can you help me understand what a cryptographic “salt” is?

I'm a beginner to cryptography and looking to understand in very simple terms what a cryptographic "salt" is, when I might need to use it, and why I should or should not use it. Can anyone offer me a ...
64 views

### Which one these alternatives using authentication and encryption will solve this multiple-user database problem?

Which one these alternatives using authentication and encryption will solve this multiple-user database problem ? I'm trying to understand the field of cryptography, so I've started reading a ...
37 views

### What is the signifcance of inside threat in “How to Construct Multicast Cryptosystems … Secure Against CCA2”

In How to Construct Multicast Cryptosystems Provably Secure Against Adaptive Chosen Ciphertext Attack, the paper states under preliminaries: We consider the scenario where a single party, called ...
5k views

### How is XOR used for encryption?

I am a programmer, so when I hear XOR, I think about the bitwise operator (e.g. 0110 ^ 1110 = 1000). The mention of "XOR" comes ...
249 views

### Why isn't CTR mode (counter mode) used more often?

For the CTR mode, the design is good for parallelization, yes, it seems the benchmark of the program downloaded from crypto++ proves that on an Intel I7 CPU. My question is that as most of CPU on ...
138 views

### Super-simple encryption of short strings

I want to anonymise the initials of experiment participants by giving each a pseudonymic set of initials, by encrypting their true initials. Their initials are only two or three letters in length. ...
91 views

### Are there drawbacks to encrypting data locally before being encrypted in cloud backup (multiple encryption)?

I am planning on backing up my hard drive using a cloud backup service but have become skeptical of the industry based on incidents like these: ...
Given two 56-bit keys, $k_1$ and $k_2$, why does $E_{k_1}(E_{k_2}(M))$ only give 57 bits of security? So basically I'm unsure why it only gives 57 bits of security; I understand that one key will ...