Questions tagged [elgamal]

68 questions
17
votes
5 answers

Getting GPG Decryption To Work In Java (Bouncy Castle)

let me start by saying I'm extremely new to all of this. What I am trying to do is to use gpg from within Java in order to decrypt an encrypted file. What I've done successfully: Had a colleague encrypt a file using my public key and his private…
Craig
  • 1,295
  • 3
  • 16
  • 29
6
votes
1 answer

Free implementation of Elgamal

I'm looking for free implementations of the Elgamal encryption algorithm. As far as I can see, even though it's a widely known algorithm, there seems to be only two free implementations: libgcrypt supports Elgamal encryption pycrypt has…
Jay
  • 9,585
  • 6
  • 49
  • 72
6
votes
1 answer

Encrypt AES secret key with Elliptic Curve ElGamal

There is Alice and Bob. I want to realize the following process: Alice encrypts a text with AES and generates a secret key Alice encrypts this secret key with Bobs public key using Elliptic Curves with El Gamal Alice sends the encrypted text &…
5
votes
2 answers

El Gamal faster than RSA with the same modulus length?

Why is El Gamal faster than RSA with the same modulus length?
Daniel Gartmann
  • 11,678
  • 12
  • 45
  • 60
4
votes
1 answer

Data loss when encrypting and decrypting using libgcrypt and Elgamal

I am using Libgcrypt with Elgamal to encrypt a block of bytes, and I am having 2 problems: When I do not use padding and my block of bytes starts which an zero byte, I lose the first byte during decryption; If I use padding the encryption works…
Tiago Queiroz
  • 151
  • 1
  • 11
3
votes
1 answer

How to Make Encryption (c1, c2) Tuple Explicit using Bouncy Castle ElGamal and javax.crypto.Cipher

To encrypt a message with ElGamal scheme in java code, I proceed as follow: Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); Cipher cipher = Cipher.getInstance("Elgamal/NOne/NoPadding", "BC"); KeyPaireGenerator…
RaphaëlR
  • 522
  • 7
  • 8
3
votes
2 answers

How to encrypt/decrypt text files using ElGamal

I'm trying to encrypt and decrypt text files using ElGamal for my study but it seems that I could not make it work correctly. I have a group of text files ranging from 1kb - 1mb, and I'm using 512bit for my key size. I already know that just like…
celax
  • 51
  • 1
  • 1
  • 4
3
votes
1 answer

ElGamal encryption example?

I apologise in advance for the n00bishness of asking this question, but I've been stuck for ages and I'm struggling to figure out what to do next. Essentially, I am trying to perform ElGamal encryption on some data. I have been given the public part…
Kushan
  • 1,200
  • 12
  • 22
3
votes
1 answer

Generate dsa/elgamal key pair with bouncy castle that imports in GPG without error

I have created a small program to generate a DSA / El Gamal PGP Key Ring using Bouncy Castle 1.47 API. The key generation goes real well without an error. I export the private and public key to a file using armored output and when I try to import…
george_h
  • 1,562
  • 2
  • 19
  • 37
3
votes
1 answer

Has anybody Implemented ElGamal using OpenSSL or even inside?

I find out that OpenSSL hasn't implemented ElGamal. However, currently I need to use OpenSSL to implement ElGamal. I just wonder if anybody had done it before. And that may help me to reduce my work load. And, if not, is that feasible to implement…
Vincent
  • 31
  • 3
3
votes
2 answers

Elliptic curve ElGamal Java implementation

Is there a simple implementation (using Java BigInteger) of ElGamal elliptic curve cryptosystem with key generation, encryption and decryption functions; one that could be used to explain to university students in a lecture? For example, a Paillier…
xtremebytes
  • 173
  • 1
  • 14
3
votes
0 answers

Bouncy castle error: Unable to cast object of type RsaPrivateCrtKeyParameters to type ElGamalKeyParameters

I am having difficulties with decryption of a GPG file using Bouncy Castle. I have the encrypted file and I have a private key and the password for the private key. I can successfully decrypt the file using the desktop software GPG4win Kleopatra so…
DaveBeta
  • 447
  • 1
  • 5
  • 11
2
votes
2 answers

What are good and safe keylength for El-Gamal?

What are good keylength for El-Gamal?
Daniel Gartmann
  • 11,678
  • 12
  • 45
  • 60
2
votes
0 answers

Python - Algorithm for finding order of cyclic group generator

I wanted to find the order of a generator g chosen from a cyclic group G = Z*q where q is a very large (hundreds of bits long) number. I have tried the following code from Rosetta Code but it is taking too long: def gcd(a, b): while b != 0: …
user7091463
  • 137
  • 3
  • 5
  • 12
2
votes
1 answer

El Gamal digital signature construction inexplicably failing

I am trying to implement the El Gamal digital signature scheme, using the BigInteger class for generating large prime numbers. Samantha generates the public key, the private key, chooses a message, signs it and then Victor verifies the…
1
2 3 4 5