Questions tagged [encryption]

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.

Filter by
Sorted by
Tagged with
4
votes
2answers
103 views

Proving the right encrypted message was sent

Total amateur to crypto here but I've searched and searched and am at the extent of my knowledge. I've gone down several avenues to satisfy what I'm looking for but I'm just going to describe what I'd ...
0
votes
1answer
62 views

Combine signature with encryption

I have some embedded device for which I want to sign and encrypt firmware files. Firmware updates are generated by me and may be installed by the customer. The encryption is supposed to protect the ...
14
votes
2answers
2k views

What is “witness encryption”?

I recently skimmed over tho papers on time-lock encryption: “Time-release Protocol from Bitcoin and Witness Encryption for SAT” by Liu, Garcia, and Ryan “How to Build Time-Lock Encryption” by Jager ...
0
votes
1answer
31 views

How to devise cryptographic system with data-sharing ability and password reset

I originally posted this in the security.stackexchange forums but then I was directed to this one which seems more befitting for my question. I am writing a C# .NET application. For my application the ...
2
votes
0answers
33 views

Looking for a way to enlarge a message so that any modification to the “enlarged” message makes recovering the original message impossible

Let's say we have a message m of small size. I am looking for a system $S$ so that $S(m)$ is arbitrarily large, we can easily compute the inverse $I(S(m)) = m$, and any modification to $S(m)$ makes it ...
1
vote
2answers
130 views

Sensible amateur usage of web crypto API

I want to know if my usage of the web crypto API is sensible. I want to use it for symmetric and public-key encryption and decryption, and signatures, but as a non-expert I am scared by the warning on ...
0
votes
2answers
60 views

Find IV and the key ? AES with CFB or OFB

I have a question about the AES-128 and AES-256 encryption method. I need to encrypt 64-bit size data in and out. I want to encrypt them with AES. So I turned to AES-OFB or AES-CFB because these ...
-3
votes
0answers
74 views

Deterministic DSA by Thomas Pornin (Java Illustration, its Errors) [closed]

(DISCLAIMER: I'm clearly seeking a point to be illustrated from a white paper as explained here, "How should questions be handled involving code?", and <...
0
votes
1answer
67 views

Does a cipher exist with the following properties?

The key can unlock the ciphertext in polytime (measured in length of key + cipher). a. Given the key + ciphertext as input, if you cannot unlock it in some fixed number of steps (relative to input ...
7
votes
4answers
3k views

When will AES be “upgraded”?

AES is secure, but compared to other encryption algorithm which are marked as secure, it's slow. For example, ChaCha20 is faster than AES, but still secure. Also other standard-algorithms like SHA ...
0
votes
0answers
18 views

volume only saves files in clusters of 512 bytes, regardless of how large i select the cluster and format [closed]

I am experimenting clusters and formatting in veracrypt, and I have found that no matter how large or small I format the clusters in my veracrypt volumes, no matter how small the files I save, they ...
132
votes
2answers
116k 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 ...
118
votes
6answers
77k views

Should we sign-then-encrypt, or encrypt-then-sign?

We regularly want to send messages that are both (a) encrypted, so passive attackers can't discover the plaintext of the message, and (b) signed with a private-key digital signature, so active ...
0
votes
0answers
14 views

Is there any digital communication medium that provided close-to-perfect security? [migrated]

Problem When I browse this forum, I constantly read about the weaknesses of popular "secure" messaging applications such as Signal, Telegram, and WhatsApp. Some of the most notable critiques ...
0
votes
1answer
887 views

RSA encryption/decryption process is not working correctly

I'm trying to apply the RSA cryptosystem to encrypt a byte M=72, using predefined modulus n, public key exponent ...
3
votes
1answer
122 views

Is choosing $1$ as a public exponent valid in RSA?

I know it will not encrypt anything. But is $1$ valid as a public exponent in an RSA public key?
1
vote
1answer
90 views

Is there a crytographic scheme for “ciphertext consistency verification”?

I a problem that essentially boils down to the following: There is raw data, D, encrypted with key K (call its encrypted form <...
0
votes
0answers
34 views

RSA encryption/decryption values not working as expected [duplicate]

I'm faced with an issue I can't seem to understand when it comes to RSA. Below are my values for all of the parameters, unfortunately I can't seem to get the expected decrypted values from my ...
1
vote
0answers
23 views

Generating a recovery phrase for a RSA key-pair

What is an optimal way to associate a RSA key-pair with a recovery phrase/seed for access recovery purposes? I've seen a lot of cryptocurrency wallets provide this feature, however, I'm not looking to ...
0
votes
1answer
29 views

How to solve high exponent attack for same message in RSA

I know Håstad's broadcast attack when e = 3, but what if e = getPrime(randint(350))?
0
votes
0answers
32 views

Need to encrypt files after a certain lead time elapses [closed]

I edit books created in MS Word. Sometimes the authors do not want to pay for my services in a timely manner. How can I return the books to the authors un-encrypted, then encrypt the file two weeks ...
0
votes
0answers
29 views

How Should Form Input be Encrypted for sending to a Server?

I apologise if this question is a duplicate. I couldn't find any similar questions. I am writing a web app that consists of a series of drop-down style question menus. These generate more drop-downs ...
0
votes
0answers
16 views

Need help deciphering [closed]

So i recently was added on an arg type game from a friend and there is a bit of code that im not entirely sure what the cipher is, so i was wondering if anyone could help me on figuring it out. "...
13
votes
5answers
6k views

Is it easy to crack a hashed phone number?

I want to SHA256 hash phone numbers in order to hide them. Is this a good idea? Are there any other ways I could make this safe?
3
votes
1answer
99 views

randomness of encrypt

In the paper "Efficient Encryption from Random Quasi-Cyclic Codes" of Gaborit et al. p.14, I read "Encrypt$(pk=(G,Q,s),\mu,\theta)$: uses randomness $\theta$ to generate $\epsilon \...
5
votes
3answers
1k views

What is the purpose of Pseudorandom Function Families (PRFs)?

I'm currently in a course in Cryptography, and was wondering why pseudorandom function families exist at all. If there existed one pseudorandom function f(x), based on its definition, could that not ...
1
vote
1answer
149 views

Triple Diffie-Hellman and MITM

While reading about Triple Diffie-Hellman, I was wondering how it can prevent MITM if the server decides to spoof key sets. For example, Alice and Bob are connected using a server. Alice ----- ...
13
votes
5answers
6k views

Can I encrypt a message by swapping bits in the text?

I have tried out an encryption method, in which I swap bits in the text. The text length is N bit, then I generate several random number pairs in the range 0..N-1, as [n,k] pairs. After that I swap ...
0
votes
0answers
52 views

RNG randomization strength for PRF seed

Consider a use case that requires the creation of multiple asymmetric key pairs. There are two options for generating random seeds for a PRF: Use a software based RNG and generate a new seed for each ...
2
votes
3answers
304 views

Multi Factor Encryption?

I got an alert last night to the keywords above and was curious, so took a look at the tor site flagged which is the following one: http://nsrz5iogimqwgeax3clpp6hvfy6viom2woy7dghgxes4sqk63r7svoqd....
3
votes
2answers
126 views

XOR cipher with fixed key and known relation among plaintexts

I have three messages, each known to be XOR-encoded, with the same key used for each message of this XOR cipher. Encoded message 1: $e_1\,=\,00100111010$ Encoded message 2: $e_2\,=\,01001110110$ ...
6
votes
2answers
970 views

Encrypting messages for multiple recipients

With hybrid cryptography, I want to encrypt a message intended for multiple recipients. This can be archived (as described here by creating a symmetric secret key, encrypt the message with this key, ...
2
votes
0answers
76 views

Assignment: XOR-cipher [duplicate]

I am currently attending a IT-Security course at the Tel Aviv University and I stuck with the an assignment task. Please DO NOT post the solution if you know it. But I would be very grateful for any ...
-1
votes
1answer
58 views

Is storing salts encrypted a good idea?

I've read that storing password hashes in a database, you can store the salt in plaintext alongside the actual hash with no detriment to security. I was thinking that one could derive a key from the ...
0
votes
1answer
98 views

Number of operations for Elgamal cryptosystem

In page 408 of Hoffstein, Piper, and Silverman's Introduction to Mathematical Cryptography, it says "Roughly speaking, in order to achieve $k$ bits of security, encryption and decryption for ...
2
votes
1answer
93 views

Why is it secure to reuse key and nonce in ChaCha20-Poly1305 AEAD construction?

While looking at the ChaCha20 and Poly1305 AEAD construction as defined by RFC 8439, more precisely its use of the key and the nonce, I came up with the questions below. Maybe someone with some in-...
3
votes
1answer
118 views

Do ciphers with a key size of 64 bits still have use under very limited attack models?

If we have a very performance critical interactive session, like a video game, running on a trusted platform (video game console). If our goal is to prevent exfiltration of up to date information (...
1
vote
1answer
49 views

Creating nested messages in OpenPGP

I need to create a nested message in OpenPGP (my understanding is that the protocol itself should support it). Let's say I have Payload ("Time in Lordran is ...
0
votes
1answer
54 views

Diffie-Hellman Decryption with A, B, p, g, cipher Parameters

I have a Crypto assignment, trying different ideas for couple hours landed me nowhere. Supposedly during a Diffie-Hellman key exchange Alice sends bob an encrypted message, the message (cipher) is a ...
1
vote
1answer
37 views

ChaCha matrix - tests for original implementation not passing due to bad counter encoding?

Hello everyone and already thanks for taking your time to read this! I am currently implementing ChaCha20 (256-bit key) for my bachelor thesis. I know that there are two version of ChaCha out there; ...
2
votes
2answers
259 views

Is it reasonable to consider that an encryption scheme must be invertible?

I am in a dispute regarding a test question in an exam. The question is something like that: What would happen if one were to use RSA with $n=100$ and $e=13$ to encrypt a message $m$? a) You would be ...
0
votes
0answers
79 views

RNG to hide some bits

Suppose I have a sequence of bits of length M. I need to hide N out of M bits (hiding means forcing them to be 0) using RNG with a key. How I can relate the output of RNG to the number and positions ...
0
votes
0answers
18 views

Generate version 3 x509 certificate from version 1 CA

Please do forgive me for my naivety. I have inherited a legacy system wherein the CA which signs the certificate is of version 1. Is it possible to generate a x509 version 3 certificate which is ...
0
votes
1answer
52 views

How to provide secure password based encryption with password reset option

I am trying to build website that will encrypt some data for the user using his/her the output of scrypt on it, now the idea is that this schema is not flexible because if the user loose their ...
0
votes
1answer
55 views

Plaintext with 'T' and 'E' alphabets missing and encrypted with Vigenere Cipher

I wrote the normal code to decrypt a Vigenere cipher encrypted text without knowing the key. But that won't work for this are two of the alphabets are missing and that would mess up the frequency ...
0
votes
1answer
51 views

Is AES ECB mode with salt and frame counter still comparatively weak?

Many advice against using AES in ECB mode as it always produces same cipher text for a given plain text. That shortcoming can be addressed by using salt appended to original message so that the ...
4
votes
1answer
102 views

Why AEAD instead of encrypting with a simple hash?

I hear a lot about AEAD encryption (GCM, EAX, ...). Why is it unsecure (it seems to be as AEAD exists) to do do that: Imagine a block of data, hash it, append the hash to the data, then encrypt the ...
14
votes
2answers
2k views

Can I still use insecure curves/ciphers for time relevant encryption?

Can Ciphers that are known to be insecure because their keysize is considered too small still be used in appliances that have a tight decryption timeframe? In particular I am looking at ECC2K-130. ecc-...
0
votes
1answer
62 views

RSA Encryption that only my family could decrypt

I was doing some thinking about what would happen to my computer and passwords if I fell off the earth tomorrow. I wanted to have a message that only they would have the ability to decrypt and I ...
0
votes
1answer
63 views

Can someone help me understand this?

In the book Serious Cryptography It says for a cipher's permutation to be secure "Different keys should result in different permutations. Otherwise it becomes easier to decrypt without the key: ...

1
2 3 4 5
72