Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
98 views

Avoid decrypting every password in a password manager

The Setup I'm making a password manager for fun. It stores a random encryption key, encrypted with a key derived from the master password, and then it stores the data, which is a list of (site, ...
1
vote
1answer
67 views

Proving impossibility for a stronger primitive

I have a primitive $A$ which is impossible to prove under some hardness assumption in a black-box way. Now, if another primitive $B$ is stronger than $A$ - in other words $B$ implies $A$ - will it ...
2
votes
2answers
74 views

Ring Signatures: Why is the combination function easy to solve?

I'm reading Rivest's How To Leak A Secret and am on the part where they describe their signature scheme ("Generating a ring signature"). Why is computing $C_{k, v}(y_1, ..., y_r) = v$ easy? The ...
0
votes
1answer
36 views

Concept of hashing a group of data and validating if a value exists within the group

When learning about cryptography and hashing, I remember seeing a concept where you could hash a number of values (ID's for example) and then validate against the hash, not storing the original IDs. ...
1
vote
2answers
399 views

Is it safe to use a timestamp to build a nonce?

I'm writing an application, which can be used on multiple clients, and share data on a server. To make sure the data never leaves the clients unencrypted, the application should offer encryption with ...
1
vote
2answers
180 views

Append text to file without decrypting & encrypting again

Is it possible to add a line to a file which is encrypted symmetrically or asymmetrically (private key refers to readkey below, public key refers to append key then) without decrypting it? I was ...
0
votes
2answers
195 views

AES-GCM conformance test

Is there any conformance tests/sequences to validate AES-GCM & GHASH() implementation? Details: I'm implementing AES-GSM, that's just for better understanding of that stuff, nothing more. Well I ...
4
votes
1answer
84 views

How do applications set up secure communications through an untrusted middleman?

I recently discovered Tox whilst looking for alternatives to Skype, and while the Tech FAQ goes into some details about algorithms used, etc. I don't understand how keys are securely exchanged. I ...
1
vote
1answer
68 views

Hybrid encryption for MQTT payload?

i've written a simple code for payload encryption, i'v done it with AES-128 CBC mode ,it works fine ,the senario is very simple : the publisher send a JSON payload format that includes the encryption ...
1
vote
1answer
118 views

libsodium stream encryption [closed]

I am new to cryptography, I have used OpenSSL and its aes-256-cfb cipher before to do stream encryption, which works great. Now I am going to try ...
0
votes
1answer
71 views

C# equivalent of openssl ecparam -name prime256v1 -genkey -noout -out [closed]

I am having some issues generating a proper private key,I need it to be an Elliptic Curve private key suitable for use with NIST P-256 which i than need to convert to Base64-encoded private key in ...
2
votes
2answers
375 views

AES and ECDH key

I am trying to understand public key encryption. I found the table below in a paper online. I am struggling to understand the meaning of this. From the bits and pieces read, I am tempted to think that ...
2
votes
1answer
126 views

Why does DES use a block size of 64 bit?

Why do we use 64 bit as block size for the DES algorithm? Is there a reason not to use another block size, for instance 72 bits?
3
votes
1answer
71 views

How are the PC-1 & PC-2 calculated for the DES block cipher?

How are the permuted choice tables - PC-1 and PC-2 - calculated for the DES block cipher algorithm?
2
votes
1answer
196 views

What is a 'known answer test' (KAT)?

Came across this concept on while reading up on the key-encapsulation protocol SIKE but haven't been able to find a good explanation of what a known answer test is formally. What is a known answer ...
1
vote
1answer
50 views

Using AWS KMS to manage secret keys

For my use case, I need to maintain a secret key with the client to generate and verify HMAC for requests. We can have multiple clients and we can not make assumptions such as a client's server will ...
3
votes
2answers
104 views

Does AES use different keys for each block of plaintext?

If you have 4 16-byte blocks of plaintext to encrypt does each block have a different 128 bit original key? Or do they all use the same?
2
votes
1answer
54 views

Encryption method that is purposely vulnerable to cracking parts at a time?

Is there a method of encryption where your key is made up of $n \cdot s$ bits, but also such that an attacker would know when they've successfully cracked each $s$-bit part? For example, the full key ...
1
vote
1answer
178 views

Perfect Secrecy prove

There was a question on my final exam, but I could not get a point. I really want to know the right answer. Question is: Suppose a cryptosystem has perfect secrecy. Prove that H(P|C) = H(P) H(...
1
vote
3answers
116 views

Encryption for IOT devices with minimal overhead

I have several IOT devices that transmits nearly 200 bytes of data every 10 seconds. I want to make the data secured but i also want to keep the data size nearly same. Ofcourse for IOT devices ...
1
vote
0answers
24 views

What are the advantages and drawbacks of using long term private keys compared to session keys?

What are the advantages and drawbacks of using long term private keys compared to session keys?
0
votes
1answer
62 views

How can a fully encrypted homomorphic program resist copying?

Let's say that we have an original homomorphically encrypted program with any possible code inside. What methods can it use to ensure that it is impossible to create an exact copy of it? Are there ...
1
vote
2answers
49 views

Multi Key Encryption but read only part of data

Is there a way to encrypt data/document with multiple keys, but every key is only allowed to read/decrypt only a certain part of the document and not the whole document? The document cannot be sub ...
8
votes
2answers
397 views

Is Bouncycastle RSA+OAEP implementation vulnerable to Manger’s attack?

I have written a code to encrypt a plaintext as below. Here I am using bouncycastle crypto provider and referring to the RSA+OAEP for that. ...
2
votes
3answers
212 views

Why is it impossible to find the private key from the public key?

From what I understand, based on the article A Beginner’s Guide: Private and Public Key Cryptography Deciphered, the public key is generated by performing $n$ tangent plus mirroring operations from ...
3
votes
3answers
113 views

Calculate the Number of active s boxes

I really want to learn how to calculate the number of active s _boxes for block cipher cryptographic algorithms. I want to do that manually after running each round of an algorithm such as LED ...
2
votes
1answer
48 views

Can I implement key recovery without compromising security?

I'm no crypto expert but I'm trying to figure out if this is possible: I'm building an application that has access to very sensitive user data. I receive this data in plain text but I'm not allowed ...
1
vote
2answers
149 views

How do I check if the output of my CFB TEA encryption algorithm is correct?

I have an assignment question regarding the TEA cipher in CFB mode. After much difficulty and research, I managed to produce an 8-bit TEA / CFB encryption algorithm. My input is supposed to be a ...
2
votes
2answers
100 views

What do people mean when they talk about forward secrecy in ciphers?

I've heard several people and websites talk about ciphers that have forward secrecy. I know about forward secrecy in key agreement protocols, e.g. RLWE, (EC/SI)DH, QKD, etc. This could be what they're ...
0
votes
2answers
120 views

Is an AEAD the recommended method to add encryption + HMAC to a protocol?

Assuming you are dealing with a competent developer/team, and you are advising on adding security to their protocol. Also for the time being lets not worry about the key establishment and validating ...
1
vote
0answers
72 views

Where shoul I store private/public keys and how should I share it?

I'm new in terms of encryption and I have to encrypt the data between two Java Spring applications, one have serves as MVC framework and other as Web Service, I'm implementing an asymmetric encryption ...
1
vote
0answers
74 views

What is the fastest way to generate truly random one time pad without electrical or any other complicated device?

I want to generate truly random one time pad as fast as possible but without the use of any electrical or any other complicated device. What is the fastest way to do that?
1
vote
1answer
79 views

How can a user-input password be used to generate a natural-like dictionary corpus?

I'm curious about the implications of cryptography and the generation of natural text (i.e using Markov chains), and I am wondering if there has been any cryptographic protocols that involved ...
0
votes
1answer
55 views

How could an offline app verify a signature from one of many private keys?

I have a situation where an offline app needs to be able to verify whether some data was created by a set of privileged users of the app. These privileged users will each have one private key of some ...
1
vote
2answers
201 views

Should number of iterations of PBKDF2 stay secret?

Let's say I encrypt my passwords with PBKDF2 and store it somewhere. Now let's say it was stolen and the hacker, who stole it knows it was hashed with PBKDF2. Does a knowledge of number of iterations ...
0
votes
1answer
60 views

AES256 mix column code generating output bigger than 8 bits

I'm implementing AES256 in javascript with block size 128 bits and i understand every thing about AES except mixcolumn transformation. so i copied this code from the internet and both mixColumn and ...
0
votes
1answer
59 views

Can you create asymmetrical encryption algorithm from symmetrical, without knowing how the algorithm works?

Let's imagine that we have some symmetrical encryption algorithm, that has only two functions: Encrypt(Data, Key) and ...
1
vote
2answers
85 views

ROT encryption with hash functions

I am not trying to create my own encryption (I am just interested in the math and possibility of this form of "encryption"). I apoligize if this post does not fit in, it is my first time posting. A ...
0
votes
3answers
187 views

Shannon entropy of string, not same in Binary form? But just as good as a password?

This string, "Au+u1hvsvJeEXxky" has a Shannon entropy of 3.75 and a length of 16. The binary form of the string ( derived from Ascii-table ) is: 01000001 01110101 ...
0
votes
1answer
81 views

Challenging Question for the Build a Secure MAC with Special Properties

We would like to ask you to give a construction for requested scheme which provides those properties or give a proof that is not achievable. [Note that unsuccessful attempts to build such a scheme ...
2
votes
2answers
75 views

What encryption/decryption method should I use when multiple users should have access to the encrypted information?

Ok, I am in a little bit of cryptographical fix :D I need to figure out a way to encrypt and decrypt data handled by a website. The website is intended only for a certain group of people who will ...
-1
votes
1answer
67 views

Is this construction a secure MAC?

Let $F:\{ 0,1 \}^n \times \{ 0,1 \}^ n \rightarrow Z^*_q $ is a PRF, and $H:\{ 0,1 \}^{2n} \rightarrow \{ 0,1\}^n$ is a secure hash function. Is the following construction $\Pi=(Gen,Mac,Vrfy)$ is a ...
3
votes
1answer
113 views

Is this secure?

I have an encryption scheme where the secret keys are $(\alpha_1, \alpha_2)$ and $(y_1, y_2)$. $(y_1', y_2')$ are public information. The ciphertext is: \begin{align*} \mathit{ct}_1 &= r_1 \...
0
votes
0answers
89 views

KeeChallenge 2 factor Security

I recently started updating the KeeChallenge KeePass Plugin https://github.com/whinis/keechallenge source code to make it use PLGX and working on other features however I don't have a large background ...
1
vote
1answer
108 views

Key transport vs key encapsulation?

What exactly is the difference between key transport and key encapsulation? Either they seem to be used interchangeably, either I'm mixing stuff up.
0
votes
1answer
239 views

Decode & Verify Base64urlUInt-encoded RS256 Public Key from Google

According to Google, to access the id_token it sends along with Access Tokens (for accessing their API), you must first validate the token using the RS256 Public Key available from this page. The ...
2
votes
1answer
174 views

Cipher Feedback Mode - sizes of the blocks and shift registers

I have a question regarding the resulting sizes of the blocks and shift registers in Cipher Feedback Mode. In the web there are different pictures to illustrate the CFB-mode. Now on the first ...
0
votes
1answer
63 views

Basic encrypted custom protocol

I've been suggested to ask here instead of stackoverflow, so here I am. I'd like to encrypt the data of my application that uses a custom protocol I've created. I know about TLS and other protocols ...
2
votes
3answers
89 views

Difficulty deciphering the RSA algorithm

$d = 27, e = 3, n = 40$ For encryption, I have the letter T converted to 084 by the ASCII table, which encrypts to $24$ by $84^...
0
votes
1answer
41 views

Encryption / Decryption method secure

I was wondering whether this encryption / decryption flow is very solid / secure. I encrypt the data using AES CBC 256 bit with an static IV. When the user logs in with his Firebase account (first ...