# Questions tagged as ['decryption']

In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Only authorized parties can decipher a ciphertext back to plaintext and access the original information.
Score: 0
Pretty much confused about pretty good privacy-:
1. 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 ...

Score: 0
Don't know how to approach this problem, or where to start. Finding an adversary to a hiding and binding game

I have this problem:

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 ...
Score: -1
How to decrypt a file using RSA and just a public.pem file?

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 ...
Score: 1
Where to store salt for PBKDF2 and initialization vector for AES via WebCrypto

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 ...
Score: 0
Teaching AI a cryptogram and asking it to solve a similar cryptogram on its own

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?

Score: 0
Example of exchanging information

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

Score: 0
How does knowing the factors of the key help me decrypt?

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.

Score: 0
Vigenere Decryption with key length

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.

Score: 0
Is it possible to get the SHA256 hash collision with partial known data

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

Score: 1
Can you decode aes by hand if you have the key?

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

Score: 0
RSA implementation not working with large values for plaintext

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

Score: 1
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:

1. Key (secret)
2. Constant (not secret)
3. Block Number/Counter (keystream block number)
4. 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 ...

Score: 1
Read ECDHE traffic with Wireshark or the like

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

Score: 0
How do I progress with cracking this monoalphabetic substitution cipher that ignores natural word divisions?

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

Score: 1
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.

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

Score: -2
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 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?

Score: 0
Decrypt a ciphertext knowing of a pattern of key repetition

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

Score: 0
Fast key exchange algorithm in hardware with small key size

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?

Score: 2
FOR AES GCM decrypt function, Does the output(PT) depend on Tag value(T)?

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

5.2.2 Authenticated Decryption Function Given 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 ...
Score: 0
RSA use prime p as public exponent

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

Score: 0
Can we determine the size of n-bytes before encryption by AES-128?

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

Score: 0
My fernet key "expired" what now?

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

Score: 1
Encryption of data with multiple possible decryption keys

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

Score: 0
RSA DECRYPTION when N gives only one prime number

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

Score: 1
Decryption of an unknown cipher

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

Score: 1
decryption in IDEA if the encryption was made without the output transformation

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

Score: 2
What is the correct order of operations for one-time pad cipher when using subtraction and mod 10 arithmetic?

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
- ...`
Score: 1
Where exactly do you add the zeroes to a URL in a padding oracle attack? Also, how would you decrypt a file this way?

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:

http://somesite.com/place?ciphertext=aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccdddddddddddddddd ...

Score: 1
Completing RSA Encryption

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

Score: 0
How can I go about decrypting some files that were most likely encrypted using android's file-based encryption?

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