# All Questions

155 views

### Montgomery Algorithm

I'm trying to undestand how it works and how to implement the algo described in this paper. The paper shows a methods to compute a modular multiplication where it is used multiplier with a resolution ...
62 views

### Implementing modular reductions (n*n) [closed]

I'm implementing a public key cryptosystem in a proprietary System On Chip that only allows modular reductions by $n$. However, that cryptosystem requires ($n^2$) modular reductions. Perhaps someone ...
469 views

### Efficient setup for a Montgomery multiplication

Montgomery described an efficient method to compute a modular multiplication. This works by using a special constant $R$ and assumes the inputs $a$ and $b$ have been made into a special representation ...
484 views

### Blockwise Montgomery multiplication

I have to implement a 256*256 bit Montgomery multiplier for pairing computations. The straightforward approach is to use a bit-serial version, but I would like to utilize the built-in 64*64 bits ...
439 views

### Montgomery Exponentiation - selecting input value R for a given BigInteger

I have Montgomery exponentiation working, but it's working quite slow. I suspect there are two reasons for this - I implemented it bit size instead of word size (I didn't realize at the time that ...
72 views

### Where is the OID and ASN.1 specified for AES_CMAC?

I have a requirement to implement AES_CMAC as the authentication algorithm in a CMS library. I just can't seem to find the OID and the ASN.1 definition for it. I expected to see the OID under ...
262 views

### extract ciphertext from encrypted SMIME file

the main question of this message is how to get the true ciphertext from S/MIME file? I created RSA keys and encrypted a message with S/MIME as follow : ...
196 views

### PKCS#7 signed data structure in signed PDF document

Is it mandatory to include PKCS#7 data (OID 1.2.840.113549.1.7.1) octet string into the sequence of PKCS#7 signed data? I mean if you want to sign PDF, you are basically adding PKCS#7 container ...
78 views

### Are keys generated by the user or block cipher algorithms themselves? [closed]

We know block cipher algorithms. In the block cipher algorithms, Key Scheduling is the one crucial part. I see that in some simulation programs of the AES,DES,TripleDES encryption algorithms. In ...
126 views

### How are subkeys, in Feistel block ciphers, derived for each round?

I'm bit confused about the subkeys that are used in Feistel ciphers. I know that all the subkeys ki are derived from the main key K, but how? Say I have a simplified Feistel block cipher of i rounds, ...
161 views

### Is CBC theoretically harder to brute force when compared with ECB?

Theoretically – is CBC mode harder to bruteforce when compared with ECB when assuming: we ignore computational cost for the XOR operations, and the IV is made public?
232 views

### Known plaintext, unknown 128 bit block cipher

I have an encrypted configuration file from an embedded device which I'm trying to decrypt. The file seems to be encrypted in 128bit blocks, as changing a single option causes a 16 byte block to ...
381 views

### Difference RSA keypair creation openSSL and openPGP?

Creating a 2048bits RSA keypair I figured that doing this using openssl takes as an input 32bytes of "randomness" from ...
1k views

### Strength of CBC with Ciphertext Stealing

Is CBC with Ciphertext Stealing (CTS) considerably weaker than CBC with padding such as PKCS7? I would imagine the most common situation where CTS is necessary would be due to some size constraint of ...
261 views

I'm playing around with an application for secure email-like communication and I want to perform length hiding padding on the plaintext messages so they always have a consistent size before encrypting ...
136 views

### Padding always the same, problem or not?

I need to transmit long encrypted messages to a smartcard over a limited capacity link so I need to fragment the messages somewhere before sending thzm. My problem is that I split the message into ...
186 views

### Security of (cryptographic) padding compared to other methods for blockcompletion for block ciphers

As said in the heading, I want to know how the security of different padding methods, e.g. ANSI X.923, ISO 10126 and PKCS7, is compared to other methods to reach the needed block size, like ciphertext ...
392 views

### What prevents a padding standard to cause a data loss?

In here different byte padding standards are listed as ANSI X.923, ISO 101.26, PKCS7, ISO/IEC 7816-4 and zero padding. All of them seems to apply padding to the last byte blocks. Odds are rare but ...
2k views

### Padding methods for block ciphers - PKCS7 vs ANSI X.923

I was looking through block cipher padding methods, and found two good candidates: ANSI X.923 - pad with zeros, then a final byte for the padding length, e.g. ...
77 views

### 2DES vs. two-key triple encryption, with no decryption step

So studying double encryption (double DES) and understanding why it is subject to a Meet-in-the-middle attack, I tried to see if the same attack could be applied to a triple encryption with only two ...
1k views

### Okay to use OpenSSL to encrypt then sign a message?

I am planning on encrypting a message then signing the message so the recipient can authenticate the source. Reading this article has me concerned that I'm doing something wrong. My current plan is ...
480 views

### Blind signature with openssl

I'm trying to understand (to reproduce in practice) how does blinded tokens work. Currently i'm lacking examples. According to Wiki the blinded signature protocol is the same as ordinary signature ...
120 views

### Turning a 64 bit block cipher into a 128 bit block cipher

There are quite a few block cipher modes of operation that require 128 bits. There are also modes of operation where a higher block size than 128, e.g. a block size of 256 bit would even be practical. ...
161 views

### Simplified Example of ECC to use in the classroom

I have come up with the following rudimentary example of how ECC relates to asymmetric keys. Is this a valid explanation of ECC and its relationship to asymmetry? To only be deciphered by the person ...
353 views

### Finding discrete logarithm with baby-step-giant-step algorithm

I am trying to use the Baby Step Giant Step algorithm to find discrete logarithm in: $$a^x= B \pmod p$$ with using BSGS: $$x = im+j$$ $$a^j = B a^{-im}$$ where $m = \sqrt{p}$ Wikipedia says: ...
83 views

### 3DES over Galois Counter Mode (GCM) for authenticated encryption

Is it possible to use DES or 3DES over Galois Counter Mode (GCM) to provide authenticated encryption? I haven't seen any implementation yet.
9 views

### What is search space of this problem? [duplicate]

I have an exam and i have no time to solve this problem(I think about it a lot but i do not solve it).please help me and solve it for me: $A$ is a random number and has $512$ bits.We make $B$ ...
767 views

43 views

### Establish Trust By Signing Random Seed

I'm trying to get my server to establish trust with a client. Neither is on the Internet, so there are no certificate authorities. The typical way to establish trust in my domain is for a client to ...
31 views

### Voting protocol - How many dishonest tallying centres can the protocol cope with?

We have the voting protocol that is described here. I am looking at the following exercise: Determine how many dishonest tallying centres the protocol can cope with before the following properties ...

15 30 50 per page