Questions tagged [elgamal]
68 questions
1
vote
3 answers
How can i convert a string into a ZZ number?
I'm using the NTL library to implement ElGamal encryption/decryption algorithm.
I've got it to the point that it's working but the algorithm wants the message to be converted to integers so it can be encrypted.
So if i input a number like 1234…

daniels
- 18,416
- 31
- 103
- 173
1
vote
0 answers
How do I use ElGamal encryption with ezPyCrypto
I came across an nice encryption module ezPyCrypto for python's PyCrypto module. In the description it says that the user can specify between RSA and ElGamal encryption, but I can't figure out where I'm supposed to specify this in the code (API…

user2090916
- 91
- 2
- 6
1
vote
1 answer
How do I export an ElGamal key to a text file?
I've been working on encrypting a string and displaying it as a QR code (after base64 encoding the string).
I want to use the ElGamal private-public key encryption module in PyCrypto for the encryption, but the problem is that it has no export…

user2090916
- 91
- 2
- 6
1
vote
0 answers
Elgamal Encryption & decryption
if a game is sending encrypted data by Elgamal and u have (p g y ) while game should send a=g^k mod p and b=(msg)*y^k mod p,so u gonna recieve (a,b) and the recieved msg is in hex form
such w/e like ......................
This is just Example ( not…

Nasr
- 13
- 5
1
vote
1 answer
ElGamal C# implementation
I want to implement ElGamal encryption. I need this for my school work but when I want do decryption the last step is always 0 cause of (b/Math.Pow(a,x))%primenumber is always less then 1.
Here is the keys generation:
public void GenerateKey() {
…

MartinS
- 751
- 3
- 12
- 27
1
vote
0 answers
Elgamal Or RSA Encryption in Bouncy castle is not taking large input
Possible Duplicate:
RSA Encryption Problem [Size of payload data]
I need a system in which I generate digital signatures on some data using say ECDSA in bouncy castle. & then use the same signed text & further Encrypt the same text using either…

Yogesh
- 11
- 2
1
vote
2 answers
ElGamal on SmartCards
I was wondering if a smartcard/Javacard is able to perform ElGamal cryptography?
Is it implemented anywhere, i.e. is there an API that can be used for such purposes?
Cheers!

user1304490
- 181
- 2
- 2
- 11
0
votes
0 answers
Python library to encrypt files with a GnuPG v1.2.1 Elgamal key
I'm developping an Azure function that can encrypt/decrypt PGP messages given a key and a message.
It works fine for most keys using pgpy library but I have a public key Version: GnuPG v1.2.1 (GNU/Linux) that I can't use with pgpy since it returns…

Maxime
- 818
- 6
- 24
0
votes
0 answers
Speed up exponential elgamal decryption
I am implementing the exponential El Gamal cryptosystem (the same that El Gamal, but encrypting g**m when you wanna encrypt m). I am working with plain texts between 1 and 10**35. Everything is fine until the moment of the decryption corresponding…

fermacias
- 1
- 1
0
votes
1 answer
Finding generator g for a 20-digit prime integer I'm Elgamal
I was curious to learn if there is a simple method/algorithm through which I can obtain a generator g for a 20-digit prime integer to implement in Elgamal cryptosystem.

Zod
- 1
- 1
- 2
0
votes
1 answer
Python: Large float arithmetic for El Gamal decryption
Context
The decryption math formula for the El Gamal method is the following:
m = ab^(-k) mod p
Specifically in Python, I want to compute the following equivalent:
>>> m = (b**(-k) * a) % p
The issue in the above Python code is that the numbers…

lattejiu
- 119
- 8
0
votes
1 answer
ElGamal import a big prime number
I recently implement multiple cryptographic schemes. I plan to use Java Bouncy Castle. I found importing the scheme is very easy. My first implementation is the ElGamal encryption.
My question is that how to import my generated Big prime number p…

chaoliu
- 1
- 1
0
votes
1 answer
How can I encrypt/decrypt content with ELGAMAL PGP algorithm by using Bouncy Castle Java library with Certificates persisted in JKS
I need to encrypt and decrypt some messages with PGP and using ELGAMAL algorithm. My Keys are stored in a JKS Keystore. As far as I understand I first need to read keys/certificates from JKS and convert them into PGP Keys so they can be used in PGP…

cancomert
- 51
- 6
0
votes
0 answers
TypeError: Cannot read property 'elGamal' of undefined
Im running the below code snippet and I'm getting the error TypeError: Cannot read property 'elGamal' of undefined
var sjcl = require("sjcl");
var keys = sjcl.ecc.elGamal.publicKey(); //choose a stronger/weaker curve
var pubkem =…

Medi
- 1,026
- 2
- 9
- 12
0
votes
1 answer
El Gamal encryption of clear Text (not numbers) not woring
Below is my JAVA code for encrypting clear text (not numbers).
Code includes both encryption and decryption.
The decrypted text doesn't match clear text, what am I doing work?
My code works if I replace BigInteger m = new BigInteger(msg.getBytes());…

user3023949
- 121
- 2
- 8