# Questions tagged as ['decryption']

- Authentication-:

I understand that authentication is basically digital signature. But what I don't understand is how it has been explained here specially the RSA key part. It is leading me to huge confusions.

In RSA encrpytion, we use public key(of whose sender or receiver?) for encrpytion and private key(of whom?) for decryption.

They say hash is encrypted using RSA. But why are we using PRIVAT ...

I also have the python version of this problem here:

```
import json
import sys, os, itertools
sys.path.append(os.path.abspath(os.path.join('..')))
from playcrypt.tools import *
from playcrypt.new_tools import *
from playcrypt.primitives import *
from playcrypt.games.game_bind import GameBIND
from playcrypt.simulator.bind_sim import BINDSim
from playcrypt.games.game_hide impor ...
```

I have an encoded file and a public.pem file. Is it possible to decode the file using the public.pem file or do I have to start looking at private keys?

I tried https://github.com/Ganapati/RsaCtfTool with no luck. The public key (pem) is as below

```
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjHDiqVkO1umD2/Tm20Wt
LpyBXGoIk4Pczeqjwz7/kwYLnQI7VlAzgjC9jD1dX80Z+kLOr5wHIDdfNK55 ...
```

I would like to build secure notes via javascript and webcrypto.

I have found the possibilities to generate strong key via `PBKDF2`

and encrypt data via `AES`

.

Here is a sample how to generate key via PBKDF2 in webcrypto, where is required salt:

```
function getKey(keyMaterial, salt) {
return window.crypto.subtle.deriveKey(
{
"name": "PBKDF2",
salt: salt,
"iterations": 10 ...
```

Say that 1 cipher and another are known to hold some form of correlation. Would it be possible to teach an AI one language through the training of a model and allow it to make make predictions on another?

If so, how? Has this been done before?

I am searching for a simle model that can simulate the following procedure.

Suppose that $i$ and $j$ are two agents that each one obtains her state dependets signal $s_i(\omega)$ and $s_j(\omega)$. After observing their own signals with probability $1$, they do not know anything about the signal that the other agent has, but they do know the common prior $\pi$ about the signals, s.t. $\pi:\Omega\to \D ...

I recently started learning about cryptography and its Quantum aspect and I came across Shor's Algorithm (which solves the following problem: "Given an integer N, find its prime factors").

I also came across this video called "How Quantum Computers Break Encryption | Shor's Algorithm Explained"

I am still confused about how knowing the factors of the key is going to help me solve the problem.

I have a question. If I have 2 ciphertexts given and the same key has been used on both. They key lenght is the same as the plaintext and cipherrtext length. How do I decrypt them and find the key. So far I know that c1 + c2 = p1 + p2.

I have a text sentence that consists of `448 digits [0-9] [a-f]`

*(in HEX format)*.

This text sentence is partially cut off, but I know the middle, and the beginning and end are damaged.

What I know is `322 known digits`

in the middle of a text sentence.

`74 unknown digits`

at the beginning

`52 unknown digits`

at the end

That is, the entire text * Size: 224 bytes* and it is hashed using the

**SHA256**hash algorith ...

I made a javascript aes encryption program and I do have the key to what I encrypted. Is there a way to use that key and figure out what was encrpyted without help of a program? I encrypted "Hello" with the key 2892 and got EQ/9Yt/IvIAmtF0wKYbb3+XYUOKuKlxJ. Is there a way to apply the key to the characters and fully decode what it says without making a program to do it for me? This is just so I can prac ...

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 (numeric value).

Input: p=53 q=59 e=3 plaintext = 1000 (private key computed as 2011)

Here, the decryption gives `1000`

as the plaintext, which is correct.
Now, if

Input: p=53 q=59 e=3 plaintext = 10000 (priv ...

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 number per encryption/key & considered non-secret)

My question is how do I store a 12-byte (96-bit) ChaCha20 Nonce on a Cipher-Image/CipherText, specifically a BMP file?

I want to do this so that th ...

There is some https traffic from a specific server (which I have the certificate and private key) that I need legitimately be able to read.

This traffic doesn’t come via browser so besides the ephemeral protocol being used using a pre-master secret key is not an option.

Is there any way it is possible to decrypt and analyze the traffic without downgrading the cypher suite to some deprecated RSA no ...

Having some trouble cracking this cipher (this is part of a homework assignment for a cryptology class) I've looked at letter frequencies but I'm not sure what else there is to help me.

Given the encrypted string, `TNFOS FOZSW PZLOC GQAOZ WAGQR PJZPN ABCZP QDOGR AMTHA RAXTB AGZJO GMTHA RAVAP ZW`

, the word `LIBERTY`

is encrypted somewhere in the ciphertext.

From that, I find A and Z line up almost perfectly ...

**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.

On this level, we have access to a binary that encrypts any file by stream cipher, using a key from a file we do not have access (keyfile.dat) and a random number. We also have a hint: 8 bit LFSR.

My qu ...

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 person and he decrypted it with a public key, added the data and encrypted it with the same public key and sent it to me. The whole task is written in Python, can there be any libraries for this?

I have two ciphertexts (I do not know which encryption algorithm was used to create them) which both starts with the same 3-characters long word. This led me to believe that the same key was used for both of them and that I could exploit that to decipher it.

I thought that one-time pad was used there, so I tried to XOR them together to get the XORed plaintexts, but I cannot decipher it so I think ...

Which asymmetric algorithm will be best only for key exchange to set up communication using symmetric cryptographic algorithm. Comparison should be in term of speed, key length and their hardware implementation on FPGA?

According to spec, FOR GCM decrypt function input is IV, A, C, and T. As mentioned below:

5.2.2 Authenticated Decryption FunctionGiven the selection of an approved block cipher, key, and an associated tag length, the inputs to the authenticated decryption function are values for IV, A, C, and T, as described in Sec. 5.2.1 above. The output is one of the following:

- the plaintext P that corresponds to th ...

I've got two 1024 bits prime $p$,$q$,and $n$ = $p$ * $q$. now I know the result of $ c^{p} \quad mod \quad n = x$,also the value of c is given, I wonder if it is possible to factorize $n$.

I am writing a program in python to encrypt files. This program takes subsequent 1024*1024 (1 mebibyte) chunks of data from a file and encrypts it using AES-128. This is performed in a loop until all the data in the file is encrypted. The issue is that the size of each 1 mebibyte of data is increased when it gets encrypted.

What I need is a way to determine the new chunk size for each 1 mebibyte ...

6 months ago i created a bot that basically stored every users data in json format in different text files and i had a fernet key. I basically didn't touched it for like 2 months now, because it's a bot for students. So here is the thing, school starts is 15 days, i have 106 accounts which are encrypted using a single fernet key and i can't decode any files because it says that it's corrupted. What can ...

I'm new to the Cryptography Stack Exchange, so my question might be very naive.

What encryption algorithms are out there that will allow different decryption keys to decrypt the same piece of encrypted data?

For example : If the data that I'm encrypting is just a simple string : `"Test"`

Then applying the encryption algorithm changes it to this : `"532EAABD9574880DBF76B9B8CC00832C20A6EC113D682299550D7A6E0F ...`

I am getting only 1 prime factor to some power if i factorize N for RSA decryption. So, in this case what will be the value of P and Q. P will be that one Prime Factor and then there is nothing left for Q.

Kindly help me out

How can I identify the cipher that encrypted the data shown below?

I'm very new to this field, so I am not sure.

For example:

How does one know which cipher is used in the following line? How can one decrypt it?

`$&Es6a@I+v5;|`h_$)q?2Kq75w=p|%tK+)8K)K}d!b_l`

I'm implementing IDEA encryption and decryption and I'm trying to implement it in different variants(e.g if we didn't do the output transformation or if we don't do full 8-round encryption).

I got the encryption and decryption right for all variants when there is an output transformation, but I'm having trouble in decryption when there is no output transformation.

I know that decryption in IDEA is b ...

What would be the proper order of operations for OTP encryption/decryption when using subtraction and mod 10? E.g. **P - K = C** or **K - P = C**

Most of the sources I have seen do not cover this topic or I didn't grasp the principles behind this encryption well enough. From what I gather it shouldn't matter as long as the pad key numbers (**K**) are truly random.

For instance:

```
PLAINCODE: 65417
OTP PAD(-): 47757
- ...
```

I have been studying various crypto attacks, and one of the attacks that I have recently studied was the padding oracle attack. Now, I mostly understand it, but there is one aspect of the padding oracle attack that different teachers from different sources have confused me about:

Let's say I have a URL:

Being new to cryptology, I'm trying to understand how I would complete RSA encryption by hand. I can only follow the formula so far before becoming very confused.

I want to encrypt the value "123"

First, I am to select 2 primes. I choose: $$p = 101\\ q = 103$$

Next, I compute: $$n = p\cdot q = 10403$$.

After that, I compute: $$\varphi(n) = (p-1)\cdot(q-1) = 10200$$

Now, I want to choose a public expo ...

I am looking to try and decrypt some files from a phone that I no longer have. I've tried to provide some background information here for context purposes.

The files in question were backed up from an Android phone running Android One (technically they are from an SD card (which I still have, but formatted) which was used as internal storage) before it was sent for repair (and was subsequently s ...