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
2
votes
1answer
114 views

How to have a hash function that maps from a group element to a binary string of a certain size in charm-crypto?

I am facing a problem in programming with the charm-crypto library. The hash functions for pairing group elements in charm-crypto can only map from a string to a specific field: $\mathbb Z_r$, $G_1$ ...
1
vote
1answer
111 views

Two-way encryption algorithms similar to bcrypt

I'm in need of an algorithm that can perform a very specific task: take a short string, encrypt it using an algorithm which can be scaled to keep up with Moore's Law/has a proof-of-work factor/is ...
1
vote
1answer
105 views

In general, how do e2e messaging platforms deal with changes to the structure of the encrypted data?

I'm a layman trying to deepen my understanding of crypto and private messaging by building a (proof-of-concept) centralized, end-to-end encrypted messaging "platform". Messages are sent by ...
2
votes
2answers
825 views

Which block cipher mode of operation does TLS 1.3 use?

Which block cipher mode of operation does TLS 1.3 use? I assume it is a block cipher mode that provides authentication (like GCM).
1
vote
2answers
51 views

Block cipher design criteria when specifying key size

For a given block size of N bits, the total number of possible permutations is (2^N)! In order to select from any one of the possible permutations, the key would have to be of length log2((2^N)!) ...
0
votes
1answer
100 views

is there any good attack model of HMAC?

are there any good attack models of HMAC ? like how it can be attacked ? if there are any possible attacks of HMAC i would be happy to know about it.
0
votes
0answers
56 views

RSA implementation not working with large values for plaintext [duplicate]

While implementing RSA encryption/decryption (using python), the plaintext doesn't match with the decrypted ciphertext for large values of plaintext. Works fine for smaller values for plaintext (...
3
votes
2answers
69 views

Confusion and diffusion misunderstanding

I am reading the book titled "Algebra for Cryptologists". The author defined the confusion and the diffusion as follows: Confusion: Confusion is intended to make the relationship between the ...
-1
votes
1answer
84 views

What would be the benefits of using a faster cryptographic system with the same level of security as AES

Essentially I'm asking, what if I have designed a quantum-proof stream cipher that is faster than AES-256? Will using less computational power for encryption/decryption be valuable to companies or ...
2
votes
1answer
117 views

Factoring a RSA modulus given parts of a Factor

e,N,c and around 2/3 of p are given and I need to get the whole p to decrypt c. ...
1
vote
0answers
39 views

Scheme where earlier hashes provide "hints" to find same or nearby hashes

I am looking for a hash methodology that allows previous hashes to provide "hints" to find same or nearby hashes: if I expect to find a message $M = P + U$ consisting of private $P$ and ...
0
votes
0answers
41 views

Is Transposition Cipher perfectly secure?How to prove it?

Is Transposition Cipher perfectly secure?How to prove it? I can't figure it out by comparing |M|and |K|
3
votes
1answer
302 views

How to decide if an element is a public key in NTRU encryption scheme?

First, I'm using the settings of https://en.wikipedia.org/wiki/NTRUEncrypt, with $L_f$ set of polynomials with $d_f+1$ coefficients equal to 1, $d_f$ equal to $-1$ and the remaining $N-2d_f-1$ equal ...
3
votes
2answers
184 views

Encrypting/Salting GPS Coordinates

Is there a way to encrypt/salt GPS coordinates irreversibly without the private key/salt, while conserving distance metrics? For example, map 32.16,105.47 to some other values, but be able to ...
0
votes
1answer
32 views

Calculate number of active S-boxes for a cipher where one word observes multiple times overlapped S-box substitution in a single encryption round

There are many ways in which the number of active sboxes of a cipher for one round can be calculated. Like, a manual approach (all possible input differential are applied in the two plaintexts $P_0, ...
1
vote
1answer
130 views

Specific case of RSA where cipher text equals plain text

How did they arrive at the conclusion that there are 4 messages where plain text equals cipher text from "It is easy to show that in RSA, when e = 3 there are 4 messages m for which the ...
2
votes
4answers
187 views

What can chaos provide to cryptography?

Chaos-based cryptography is facing a lot of criticism, however, some people argue that it can provide many cryptographic primitives, such as stream ciphers, block ciphers, hash functions, public-key ...
0
votes
0answers
45 views

Time by "crypto_shash_digest"

I am trying to calculate the time consumed to run SHA1 in the kernel level. I had run the upper codes (inside a for loop) and the following was my result. It first showed about 30micro seconds and ...
2
votes
1answer
48 views

GL-SPHF and witness encryption

I recently came across this fascinating paper, and was wondering about whether the GL-SPHF that the paper constructs can be used to create a witness encryption scheme for algebraic branching programs. ...
1
vote
0answers
36 views

What is the best way to save ChaCha20 Nonce in Cipher-Image BMP file?

I have a question about ChaCha20. As far as I know ChaCha20 is a cipher algorithm that uses 4 inputs: Key (secret) Constant (not secret) Block Number/Counter (keystream block number) Nonce (random ...
0
votes
1answer
116 views

Using AES.MODE_EAX for AES Encryption [closed]

I am currently attempting to perform AES encryption in Python on a larger size file for simulation purposes. At the moment, I have been trying to use AES.MODE_EAX, as mentioned in the documentation ...
0
votes
1answer
113 views

Is there a risk that some of the expressions in the hash function can be reversed?

I have developed an application that reverses some expressions used in hash algorithms. The application does not reverse the entire algorithm, but does reverse some parts. This application reveals ...
2
votes
1answer
187 views

Digital signature with Big Brother

I have read digital signature with Big Brother but don't understand the sequence. One approach to digital signatures is to have a central authority that knows everything and whom everyone trusts, say ...
2
votes
1answer
132 views

How do we pick random elements in cryptography?

While reading papers on cryptography, a lot of time I have seen that people pick random elements $x\in \mathbb{Z}^*_q$ to do something (like setting secret key and all). How does one randomly pick ...
1
vote
2answers
52 views

Integrity while using CBC

We have a body we want to encrypt using CBC, and we add to that body one block of known text to both sides. newBody = body + knownBlock now we encrypt newBody using a key known to both sides, then we ...
0
votes
1answer
143 views

AES-GCM encryption in .NET Core

I created a crypto service using AES-GCM in order to encrypt the sensitive data in database. Firstly, I'm generating a cryptographic key from a password (probably will be stored in Kubernetes Secrets) ...
4
votes
1answer
544 views

RSA the same message is sent with two different exponents , but exponents are not relatively prime

Hi I know there have been other questions like this on here, namely here. But of all the solutions I have seen of this problem, $e_1$ and $e_2$ are relatively prime, which is how we can get to the ...
0
votes
0answers
26 views

Any tools available for reversing/determining an unknown Encrypton Algorithm if you have access to the key, unencrypted , and encrypted data?

Are there any tools available for reversing/determining an unknown Encryption Algorithm if you have access to the key, unencrypted, and encrypted data? Basically, the only unknown is the encryption ...
1
vote
1answer
76 views

"Fixing" PCBC mode?

In PCBC mode, one encrypts and decrypts via $$ C_i = E(P_i \oplus P_{i-1} \oplus C_{i-1}) \Longleftrightarrow P_i = D(C_i) \oplus P_{i-1} \oplus C_{i-1} $$ (where $P_0 \oplus C_0 = IV$), which has ...
2
votes
0answers
68 views

Practical witness encryption?

Assume that there is a cyphertext that I want to make such that only someone who can prove ownership of a certain public key, or set of public keys would be able to decrypt. It is my understanding ...
0
votes
0answers
19 views

What security properties do I lose when letting the group creator choose group keys in a protocol similar to the Signal Protocol?

As far as I know Whatsapp ,Signal and co in their group channels first used the already existing peer-to-peer channels between the participants and protected using the Double Ratchet Algorithm to ...
4
votes
1answer
318 views

Does hashing an ECB encryption with a strong hash function produce a secure MAC?

Does applying a strong hash function like SHA-256 to the ECB-encryption of a message (using some secret key $K$) produce a secure mac? For example, given a message $m$, would a simple mac construction ...
0
votes
0answers
46 views

Is it possible to crack cryptographic method with known input/output?

I've played around with John The Ripper before and it was able to successfully crack some personal passwords via brute force. However, in those scenarios the "unknown variable" was a ...
1
vote
0answers
64 views

Can a PKE scheme be turned into a signature scheme?

Recently, I have been wondering whether you can turn any PKE scheme into a signature scheme and, if so, how (is there a general construction, or is this scheme-specific?). I have found several posts ...
-5
votes
2answers
73 views

RSA impossible to be factorized?

If the RSA numbers are odd, how can they be factorized by two primes, since a prime is only divisible by itself and 1?
0
votes
1answer
34 views

Does CPA model the challenge plaintext are the same

For a CPA-secure encryption scheme, suppose that there is an adversary who can find that the two ciphertexts are encrypted from the same plaintext. Is this encryption scheme still CPA secure? Or, CPA ...
2
votes
0answers
62 views

Reconstructing the AES-192 key out of the last roundkey

Lets assume we know the last-round key of AES. For AES-128, the whole key can be reconstructed using the last-round key since every WORD in the key schedule is based on the previous 128-bit entry. For ...
1
vote
1answer
62 views

Getting the plaintext encrypting the ciphertext

Context: an encryption game from overthewire (the link to it: https://overthewire.org/wargames/krypton/krypton6.html, also good for more info) where given the ciphertext, one must obtain the plaintext....
0
votes
1answer
63 views

Setting AES Sbox output to 0

What would happen if one would set the AES Sboxes to always output 0? Could one retrieve the key by doing so? Or what would happen if there were no Sboxes?
0
votes
3answers
323 views

Encryption using ASCII instead of bits and bytes (clarification in the body)

I am new to cryptography and I am trying to understand something. I searched it on the internet, though the question is probably a simple one, couldn't find an answer. So, please don't judge me by ...
0
votes
0answers
24 views

How does encryption systems encrypt strings? (More clarification in the explanation) [duplicate]

I am new to cryptography and I am trying to understand something. I searched it on the internet, though the question is a simple one, couldn't find an answer. So, please don't judge me by that. Here ...
1
vote
0answers
39 views

hash functions and unconditional security

To the extent of my knowledge, hash functions are based on computational complexity (and not on physical laws of quantum mechanics). So they can not provide unconditional security. But, are there hash ...
0
votes
1answer
98 views

Setting up the discrete logarithm framework

The discrete logarithm problem over prime cyclic groups consist of finding $x$ satisfying $g^x\equiv h\bmod p$ where $g$ is generator of multiplicative group $\mathbb Z/p\mathbb Z$ at a large prime $p$...
0
votes
0answers
27 views

User key management scheme: BYOK vs. client only keys vs. a mix of both

We are designing a web app where users can share documents with each other. The ultimate goal is to achieve zero trust needed by the users, i.e. client-side encryption makes sure that the servers (or ...
-2
votes
1answer
98 views

Encrypt private key and decrypt with the public key

Is it possible to encrypt with the RSA private key and decrypt with the RSA public key(not for signature) The task is that I have to encrypt the data with a private key. Transfer this data to another ...
1
vote
2answers
154 views

fast encryption with one key and fast decryption with multiple keys sequentially

Is there such a encryption and decryption mechanism: Given an encryption C = E(K1, M), where K1 is the encryption key and M is plain text, it have to apply decryption with two keys K2 and K3 ...
0
votes
0answers
37 views

Is this simple deniable encryption scheme based on streaming cypher security enough for each message?

Many existing deniable encryptions are for files or FS volumes, which are too heavy for simple short secrets, such as password, tokens, etc. So I try to implement a PoC crypto container based on ...
2
votes
0answers
58 views

Given a program, obtain a program that can operate on encrypted data

Suppose I have a program $P$. I would like to obtain an encryption function $e$, a decryption function $d$, and a program $Q$ such that $P(x) = d(Q(e(x)))$ for all inputs $x$. Ideally, the encryption ...
0
votes
2answers
68 views

Pailler cryptosystem safety

I am working on system which can calculate average salary for different positions in large companies I want to use pailler schema to do such calculation. I have 3 fields which I want to encrypt: ...
0
votes
1answer
49 views

Importance of Distribution in Cryptography

I have been studying the subject of theoretical cryptography and there has always been discussion regarding the sampling and distribution(while learning any schemes) in the class. The questions are ...

1 2
3
4 5
84