Implementing a cipher or protocol is the process of taking it from its mathematical or algorithmic description and producing a working version, often in computer software or hardware. This tag should be used for any question discussing the various potential considerations and pitfalls of this ...

learn more… | top users | synonyms

1
vote
1answer
274 views

Z*p Generator (Cyclic Group) in java

I am trying to implement ElGamal in java without using the in-built libraries. The problem occurs when I am trying to find the generators of the number(in this case 11). Everything works perfectly ...
1
vote
1answer
226 views

Efficient algorithm for remainder calculation over prime field for ECC implementation?

I am working on 224-bit elliptic curve cryptography. In this 224-bit * 224-bit multiplication results 448-bit output. I am reducing 448-bit into prime field range( prime number $2^{224}-2^{96}+1$) ...
1
vote
1answer
4k views

c# Correct Triple Des Block Encryption Usage

I found the below code online, but in its original state, the encryption was not using any padding (Padding.None), and was encrypting in blocks of 8. I wasn't able to get this code to properly encrypt ...
1
vote
1answer
66 views

Addition-only PHE in F#

Using homomorphic encryption, I would like to be able to take an encrypted integer and either add 1 or -1 for a new encrypted value. I do not want the encrypted value to be recoverable - just the ...
1
vote
1answer
184 views

How is multiplication inverted in IDEA's decryption round?

As we can see in the picture we have a multiplication in this algorithm, we know that two 16 bit inputs should have a 32 bit output, but here we just use 16 bits of the 32 bit output. For ...
1
vote
1answer
256 views

Polynomial multiplication and division in2^128

I want to multiply and divide polynomials, and implement the extended Euclidean algorithm for polynomial greatest common divisors, over a Galois Field of size $2^{128}$. Moreover, I want to use the ...
1
vote
1answer
442 views

RSA 1024bit decryption performance

i want to know how many RSA 1024 bit long key decryption can a regular pentium4 computer do per second ? how to calculate RSA performance and determine its remaining time ?
1
vote
1answer
54 views

Initialize the eight working variables SHA256

I have a little confusion in understanding explanation of SHA256 by FIPS a, b, c, d, e, f, g, h are being initialized as (this is what i don't understand) 2 . ...
1
vote
1answer
131 views

Generating Diffie-Hellman parameters efficiently

I am working on an Android project for school and I am supposed to do a DHKE (Diffie Hellman Key Exchange). Everything works well. The problem is that it takes a lot of time (really a lot) to ...
1
vote
1answer
114 views

Trapdoor implementation

Please refer to this secure index paper. On page#6, a trapdoor is defined as ...
1
vote
1answer
1k views

How can I implement the “Multiplication Modulo” and “Addition Modulo” operations in IDEA?

I am currently working on IDEA (International Data Encryption Algorithm), and I don't know how to perform Multiplication Modulo and Addition Modulo. This is how IDEA operates: IDEA operates on ...
1
vote
1answer
368 views

Recommended Books for Cryptography : Theory and Implementation [closed]

It is a great idea if experts in Cryptography from mathematicians to security engineers introduce books and textbooks which they think is helpful or instructive for all people interested in the ...
1
vote
2answers
128 views

Any real world implementation using message recovery?

During my master thesis I came across RSA-PSS-R which is in my opinion a quite elegant way of saving bandwidth and space using digital signature. But I didn't find any information about any real world ...
1
vote
1answer
469 views

OpenPGP Public-Key Encrypted Session Key Packet Key ID generation

Im probably just not reading something again, but: RFC 4880 says that a OpenPGP Public-Key Encrypted Session Key Packet (tag 1) is made up of ...
1
vote
0answers
61 views

Blowfish vs. Twofish regarding power consumption

If I wanted to use Blowfish or Twofish to provide security on a device where power consumption is crucial. Regarding power consumption, which one would win? Generally, which algorithms are known to ...
1
vote
0answers
32 views

Constructing of 16x16 Involutory Binary Matrices of Branch Number 7

In the PDF “Algebraic Construction of 16×16 Binary Matrices of Branch Number 7 with One Fixed Point”, it was given that: ...
1
vote
0answers
97 views

Sane implementations of Bitcoin cryptography routines w.r.t. side-channel attacks

Bitcoin uses SHA-256, Base58Check, ECDSA (Sep256k1) and RIPEMD-160 as the basis of its encryption (see this article for a short guide on how addresses are created). I would like to create an ...
1
vote
0answers
84 views

Weil pairing implementation - low level programming language

I'm just started to studying elliptic curve cryptosystems. My one month-goal is to write a simple signature system based on the Weil-pairing. Some parts of it can be written without deeper ...
1
vote
0answers
202 views

Does BouncyCastle (for ECC) resist timing attacks?

I need to extend the TLS protocol to be able to use other key exchange scheme based on elliptic curves. I am planning to use BouncyCastle's implementation in Java and in .NET. I am worring about ...
1
vote
0answers
105 views

Career advice for our readers [closed]

I am a first year math PhD student with work experience and an MS in math. Do you have any advice regarding internships involved with cryptography and other mathematics other than the NSA? Thanks.
1
vote
0answers
367 views

Keepass Twofish plugin security

Keepass is a well known open-source password manager program, with plugin support. One of the offered plugin is a twofish encryption mode of operation in lieu of the build-in AES algorithm ...
1
vote
0answers
56 views

OpenPGP tag 18/19 description confusion Continuation [closed]

After coming back to try to finish more of my OpenPGP implementation, I refound one of my questions http://stackoverflow.com/questions/6021360/openpgp-tag-18-19-description-confusion that I am still ...
1
vote
0answers
122 views

Security of .net AES implementation and security of a hash MAC

My question rather splits into two sections: Is AES correctly and security implemented in the .net Framework? Are there any reviews of implementation mistakes that would weaken the security of AES ...
1
vote
0answers
178 views

Proper formatting of symmetric algorithm secret key

Given this description from RFC 4880 sec 5.1: The value "m" in the above formulas is derived from the session key as follows. First, the session key is prefixed with a one-octet algorithm ...
1
vote
0answers
127 views

Setting protocol parameters to achieve concrete security

Background One issue with modern security proofs is that they are usually asymptotic. In other words, such proofs are usually formulated as follows: For any polynomial-time adversary $\mathcal A$, we ...
0
votes
2answers
142 views

Why are Fortuna entropy pools reset after a reseed?

I've implemented LibTomCrypt's version of fortuna and am wondering about the pool resetting after a reseed. In fortuna.c in libtomcrypt we have the following (which is that part that adds the entropy ...
0
votes
1answer
658 views

Implementing OpenSSL padding

I'm conducting an experiment dealing with differences in padding across different aes operations for my Intro to Crypto class, and the question says OpenSSL uses PKCS5 padding, and that I need to ...
0
votes
1answer
496 views

Attribute-based cryptography [closed]

I am trying to create a social network, in which I want to use attribute-based cryptography. One professor told me it is possible to do it only in J2EE, but he can barely code! Some friends of mine ...
0
votes
2answers
94 views

Create a field in PBC

Edited (I removed the emphasize on Integers): My question is partly cryptography and partly programming, I would appreciate any help on any aspect of it :) I want to use PBC library to do the ...
0
votes
1answer
76 views

Encrypting a broadcast channel

We're building a data service that is expected to go out through a single "fat pipe" channel. The design requirement says that the data in the channel must be protected by authentication and ...
0
votes
0answers
42 views

How to select parameters based on some condition

I am implementing a protocol for authentication where parameters need to be selected with $gcd(\mu,\phi)=1$ where $\phi=(p−1)(q−1)$. What is the best way to select the parameters while implementing
-1
votes
1answer
157 views

cryptography and use of python programming language [closed]

why is it recommended to write cryptography programs ,for example crypt-analysis projects with python programming language? what is the advantages of python? why not use c or any other language?
-3
votes
0answers
38 views

RSA encoding problem help [duplicate]

Write a program to attack the Textbook RSA Encryption Scheme in order to decrypt the encrypted file key_enc.txt which contains the 128 bits AES secret key together with the initialisation vector ...