# All Questions

56 views

### Requirement for the exponent generation during DH protocol [duplicate]

The setting is classic DH protocol. Alice computes $A = g^a \bmod p$. Alice then sends $A$ to Bob. Then Bob will send $B = g^b \bmod p$ to Alice. Are there any requirements for the values $a$ and ...
149 views

### Java RSA Padding: no libraries used

I'm trying to implement RSA without using any java libraries using the algorithm from wikipedia HERE So, anyone can clearly see that it is a raw RSA, and can directly be attacked. The question is ...
93 views

### Prime modulus for RSA and sharing a secret?

According to this paper entitled "Using Commutative Encryption to Share a Secret" they define their modulus to be a large prime p, which is public. Both exponents are private in this case. According ...
64 views

### Stream cipher key length to send

I was being argued that stream cipher's key that is the length of the message must be sent to the destination for them to be able to decrypt the message. My point is don't you only have to send the ...
70 views

### Weak Boneh-Boyen Signature in Composite order group

In the paper Ring Signatures of Sub-linear Size Without Random Oracles, authors have remarked that the scheme is instantiable in composite order setting, too. I am attaching the following reference ...
43 views

### Using Permutation polynomial to compute a MAC

Is the following MAC secure? For a block $y_i$ in a file, we defined a MAC as follows: $Mac_i:PRF(k,i) \cdot g^{y_i \cdot r_i} \bmod p$. Where $p$ is a prime number, $g \in \mathbb{G}$,$PRF(k,i)$ is ...
126 views

### Multiple encryption of part of block

Is there any security risk in encrypting parts of blocks twice? I'd like to get around block sizes and make encrypted messages just as long as the unencrypted ones: Block 1: Byte 0 - 7 Block 2: Byte ...
133 views

### XOR cipher with three different ciphertexts and repeated key, key length known. How do I find the plaintexts?

Let us say we have three different plaintexts (all alphabets, A-Z): $x$, $y$ and $z$, each of length $21$. Let the key, $a$, be also of length $21$. Now, what we have is $x \oplus a$, $y \oplus a$ ...
116 views

### One time pad probability

I'm trying to solve a question about one time pads but I'm not sure if my assumptions are correct. I am to assume that I have a one time pad with perfect secrecy. This one time pad is used to ...
56 views

### Is there a reference that prove that the AES Key Schedule generate random looking round keys?

Starting from uniformly random generated AES master key, is there a reference that prove that an specific roundkey can be considered as uniformly random generated as well ?
95 views

### How do I communicate the value of the initialization vector to the end user? Should it be part of the encrypted message?

I am taking a cryptography class and our first homework is to implement a 32-bit block cipher. I implemented a simple block-cipher that uses CBC. Currently, my implementation reads both the 32-bit IV ...
82 views

### Proving that an encryption scheme is susceptible to certain attacks

I'm currently trying to prove the following: Where p is a prime number of cryptographic size, prove that: e(m) = am + b (mod p) where a and b are private is open to a known plaintext attack e(m) = ...
98 views

### Will current encryption always remain secure? Is there mathematical proof?

Current encryption algorithms, such as AES, RSA, elliptic curve, etc. work based on known mathematical problems. I am specifically interested in the RSA. Will such security always remain secure? One ...
36 views

### Security issues for integrating AAA and OTP services [closed]

What are the main security issues for integrating AAA and OTP services. In our organization with about 1000 clients, we want to integrate the services. What are the main security issues about the ...
92 views

### Security aspects of using a global values as nonce and additional data for AES? [closed]

is it a good idea to use global values as nonce / additional data? What problems can occur? What should be take in account when we deal with such parameters for encryption. Thanks
62 views

### Why the data length is shifted 3-bit in MD4 Java implementation? [closed]

In RFC 1320, It is stated that "A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous step. In the unlikely event that b ...
69 views

### wireless network security protocol

In network security, encryption and integrity done by the same algorithm that is AES-CCM in that MIC generated by CBC-MAC and encryption done by CTR mode. So suppose I want to do encryption with any ...
81 views

### Why should I use X.509 Authentication over PKC based Authentication?

So I have two examples and I don't understand why one would be chosen over the other. Example 1. A sends EPUb[r1] to B (asks B to prove knowledge of ...
303 views

### How to implement HMAC SHA-256

I am trying to figure out how the HMAC SHA-256 hashing algorithm works. I know that we have to use the following: H (K ^ opad)|| H ((K ^ ipad)|| text)). The ...
201 views

### Help converting sha256 to 32-bit stream

I need some help with hash value calculation. I am a bit confused by this statement that I found on w3 website on calculation of a DigestValue for xmldsig ( ...
141 views

### How does bitmessage encryption work?

I have been reading around protocol specification and there is either too much technical detail or too bad articles on various sites. I need you to explain in simple words how encryption in ...
110 views

### Nonces being used in SSL and MAC to prevent replay attacks

I'm a bit confused in the way nonces are used in these processes to prevent replay attacks. Heres How I think it works during SSL: Nonces are exchanged during stage one of the handshake protocol. ...
120 views

### Updating the secret key used for HMAC

I am designing a distributed system, composed by a set of physically distributed embedded devices (8 bit cores with less than 1 KB of RAM). The devices need to be able to authenticate the originator ...
87 views

### white-box cryptography and its applications [closed]

I am a programmer who is doing research into whitebox cryptography. What I hope to do is to use WBC for an DRM application however as some of us may know, WBC is theoretically impossible therefore I ...
206 views

### Comparison among algorithm based on key length

Some months ago I found in some paper that we cannot compare symmetric algorithm with asymmetric algorithm based on the key length and more important we cannot compare asymmetric algorithm using only ...
103 views

### Using hash of plaintext as nonce in NaCl secretbox- bad idea?

I need a nonce to encrypt my stuff using NaCl secretbox. I will be transmitting the nonce along with the ciphertext, which I have been told is OK to do. It occurs to me that one could simply use the ...
76 views

### What is the difficulty of DLP in GF(P^Q) with a subgroup with a prime order of L

Given a finite field GF(P^Q), having a subgroup with a prime order of L (P,Q,L are all primes), how difficult is it to find the discrete log, is it related to P and Q or is it related to L, or to ...
128 views

### How much (home PC) CPU time is required to generate a prime number of a given size?

How much CPU time is required on a typical home computer to generate a prime number of size 100 bit, 200 bit , 512 bit and 1024 bit using given random bits of the respective sizes? Please note that ...
287 views

### How secure is file header encryption for large files?

I'm having trouble location information about whether or not encrypting a file's header is good enough. The files in question are media files that range in size from 500mb to 4GB. If I had no ...
100 views

### Entropy in relation to computer security [closed]

I am going over some lecture notes and my lecturer is off sick, so not sure where to turn. There is this equation that I cannot understand as it's given with a couple of examples. I was hoping ...
135 views

### CBC with a fixed or random IV

I have two probably quite naive questions: 1) Why, exactly, is it so bad to have a fixed (or predictable) IV in CBC mode? An example would be great! 2) Given 1), why is a random IV better? And if ...
77 views

### Interested in learning cryptography [duplicate]

I'm interested in learning cryptography outside the university(studying civil engineering). I was always interested in computer sciences and programing and in mathematics. I always try to program ...
292 views

### How to calculate AES logarithm table?

I would like to know how to find multiplicative inverses in $\mathrm{GF}(2^8)$. I know how to multiply two elements of $\mathrm{GF}(2^8)$ (for example, I know that ...
150 views

### C# implementation of curve25519 to ed25519 conversions [closed]

WRT the selected answer here: Can curve25519 keys be used with ed25519 keys? Is there any c# implementation of this or equivalent? Thanks.
60 views

### Adding a Password Hash (key derivation) function to existing password storage solution

As always we are trying to improve password storage; before just adding new ways of storing our password we need to define what threats we will mitigate by adding in a new way to store our password. ...
105 views

### How exactly to extract information base 10 from a PGP RSA key pair?

I think I understand the mathematics of RSA ok. I'm not so computer savvy though. How, exactly, can I extract $n$, $e$, $d$, $p$ and $q$ from a PGP RSA public key pair? Is there like a converter ...
81 views

### If I know the salt, can I decrypt the commitment?

Say, I salt my key(K) with y. So, my new Key is K' = Salt(K+y). Now, Alice sends commitment = E[K',M] to Bob. Bob knows the salt(y), but not K nor K'. Can Bob decrypt the message?
115 views

### Size of a MAC for a quickly checked message?

Let suppose that we have to check a message that was written one second ago. The message is discarded immediately after having being checked. What "minimal" size for such a MAC is secure ? Thank you. ...
78 views

I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be moderators, so I need to sign or ...
88 views

### Is it possible to decrypt this message with partially known data? [closed]

The following highlighted text must contains 547a5e0e008be33730158d63ce844e67 data. I don't know about encryption method and key. Is it possible to decrypt it? ...
271 views

### Encryption and HMAC in a PSKC file

This is the PSKC standard https://tools.ietf.org/rfc/rfc6030.txt In Section 6.1 6.1. Encryption Based on Pre-Shared Keys They have the following ...
119 views

### Embedded devices Authentication, Integrity and Confidentiality

Embedded devices send messages to the server. The server occasionally sends messages to individual devices(Reboot, upgrade firmware etc) After some research this is my ad-hoc solution: 1) Each ...
100 views

### Modular Reduction of polynomials in GF(2^m)

Hello I am having trouble understanding the algorithm implementation in hardware of the reduction process over galois fields of F(2^163) In the following process it ...
98 views

### Specific example of a MAC in TLS?

This seems like quite a dumb question, but I really don't know if I'm finding a answer anywhere. I understand that if i access a website that is secured with TLS, we exchange ciphersuites and so on, ...
238 views

### Find private exponent in RSA

The other answers for this confuse me, I know the principle of d in terms of the equation it has to satisfy. However I'm not sure how I would go about finding the private exponent without trial and ...
164 views

### Possible hashing scheme

Plaintext(binary) : 10101100 //very short for easy understanding Suppose we have 4 predefined schemes/functions, rotate (101 -> 011) flip (1101 -> 1011) exchange (11011 -> 10111) stretch (1100 -> ...
278 views

### Timelock puzzle improvment

I came across this question with this answer about a cryptographic timelock-puzzle that needs approximately 30 years to be solved. There is also an explanation with source code for that puzzle ...
51 views

### Is there (this) a case in which salting is dispensable?

tl;dr this is not a duplicate of "what is a salt/why use salt?" question. Instead it is specificly asking when salt may not be necessary for hashing securly? (i.e. when the data being hashed is ...