instruction
stringlengths
33
27.2k
I see that in many scripts are used keys of 16 characters for a block of 16 byte, but can I use key of 40 (for example)? And then why in some scripts with aes module the block size is set to 32 byte if aes can handle a fixed size block of 128 bit? Is it correct?
Disclaimer: I am a noob so this may well be a stupid question or one that's been asked before. I didn't see it come up after searching, though, so I'm going to assume it hasn't been asked here. The question's pretty much covered in the title. An explanation of why is below. Why? Short version: Because CBC is malleable ...
I have been reading a little bit about verifiable random functions (e.g.). In the literature, these are described as "pseudo-random functions that provide a non-interactively verifiable proof for the correctness of their output". I'm having a little trouble seeing a clean example of a 'killer application' for such a pr...
I'm in an Intro to Computer Security class, and one concept I'm having trouble understanding is how two different files could produce the same checksum. How would you produce the same checksum given two different files? So far, through reading the book, I found mention of something called the "pidgeonhole principle" th...
Given the classical scheme Playfair, say, for 5*5 matrices, I am interested to determine its unicity-distance. How should one proceed to properly do that? I should appreciate it, if I could obtain a very terse recipe, listing the kind of computations such that I could effectively compute that value myself. (I am attemp...
As was pointed out in Martin Bonner's comment I cannot prove this, but it seems intuitively impossible. An encryption function is supposed to obscure the plaintext to the point where no information can be obtained about it. If the underlying encryption algorithm can even be determined, that goal has not been achieved. ...
Let's say you were given a dump from a security breach. You want to share the email addresses affected by the breach with a separate company who pays you for this service so that they can protect their users. Maybe it's a security company, or maybe it's a large retail store wanting to prevent accounts with shared passw...
The RSA cryptosystem only works if certain constraints are applied to its input parameters. Some of those constraints are made to make it "hard" to determine the private key whereas other constraints are there to make the mathematics work. I want to understand the latter category of constraints and why they exist. Here...
I understand that one can define EUF-CMA of a signature scheme is terms of a game where the adversary is allowed to query signatures on messages of his choosing, and at the end of the game he must output a pair (m, s) such that s is a valid signature of m, and m has not been queried before. My questions are the followi...
I am trying to break a block cipher that can be defined as follows: We have 12 rounds and at each round, we perform the following operation. We split 64 bit data into 2 parts each 32-bits, $\ x_r$ and $y_r$ and compute: $x_{r+1} = M * (x_r \oplus y_r) \oplus k_0 $ $y_{r+1} = M * (x_{r+1} \oplus y_r) \oplus k_1$ Where $...
Is there a known 'non-brute force' method of determining a private key in an RSA system when all other parameters are know? I found the values of a ciphertext ($C$), its corresponding plaintext ($P$) and the values of the public key ($e$,$N$) are known. We know that: $$P = C^d \mod N$$ Here, the value of $P$ is known ...
I can easily crack a WPA TKIP using a dictionary/brute force method, provided that I collect the four way handshake. Is the same method possible on WPA2 AES? I cannot find any articles about '4 way handshake capture' and 'WPA2 AES cracking' together; but I was able to use aircrack-ng to crack my WPA2 AES wireless netwo...
I've used AES-128 in CTR mode in the past and using the same key but different IVs for each file, I wrote the IV to the first 16 bytes. Is it safe to do so with the nonces used in AES-256 GCM? I'm using the word nonce here because that's what is declared in the Sodium library. Are the uses for IVs and nonces exactly th...
I am doing project k-nearest neighbor classification over semantically secure encrypted relational data I have doubt for in smin algorithm in 1)Li ← Wi ∗ Φir′; ri′ ∈R ZN this line it the out put is original output r r 1 r r r my output -1 -1 1 r r r please help how ...
Currently I have a protocol using a simple RSA to AES handshake. I have been reading more and more and would like to implement proper forward secrecy, but at the same time I'd like to improve the performance on mobile devices. My question is, where would I start reading / learning about how to implement proper ECDHE ( ...
I realized that if the key is chosen randomly from a range that isn't a power of $2$, the one-time-pad leaks information about the plaintext. For example, if the alphabet was the first 20 naturals, then if you see a 6 in the ciphertext, the plaintext letter must have been within [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1...
When creating a Bitcoin account, you need to issue a couple of private/public ECDSA keys. Then, you derive your account address by taking a 160-bit hash (through SHA-256 and RIPEMD) of the public key and use a custom Base 58 algorithm to convert it to alphanumeric values (see the picture below, I took it from this page...
I've noticed that SHA-512 password hashing leaks some information about the password length. There's a weak correlation between password length and time to hash. It's roughly linear, but in steps of 64 or so, and also dependent on salt length. I suppose a little extra length results in one extra block of hash input for...
Given $x' \in \{-x, x\} \bmod q$ (where $q$ could be any prime of my choice), $s$ is a random element in the field, $y = x'\cdot s$ and $y' = \pm\sqrt{(x\cdot s)^2}\bmod q$ (i.e., both solutions to the quadratic residue), is there a way to tell whether $x'= x\bmod q$ or $x' = -x \bmod q$? If not, is there some other kn...
A friend of mine needed help with her website and asked how to send me her login information securely. I've never known how to do this, so I figured now was the time to learn. After some googling, I suggested sending me an SMS or a password-protected zip file. Then, just for fun, I programmed this: <html> <head> <title...
I was researching the Even-Mansour scheme and had a question that wasn't addressed in the paper that I saw, and google was minimally helpful. What if a permutation that uses secret data like the Fisher-Yates shuffle was used as the F permutation instead of a publicly known one? Would the scheme still be equivalently se...
Lets say I need to update a project and allow anyone to distribute the updates, however I need it to be secure, so I hash the data and sign the hash, this project uses MD5. How likely would it be that a person could obtain the signing key or falsely sign files that could be distributed using the following information? ...
I've got everything else (e, p, q, phi(n), n), but cannot see a way to figure out what d should be. P and q are both 300 digits, so phi(n) and n are about 600 digits, but e is only 5 digits. I do already understand that ed is congruent to 1 mod phi(n). Thanks for any suggestions.
Currently my padding is adding a string of random characters $ l(N)/3 - (l(M) + 1) $ Long and just adding it to the messages, is this sufficient? $l(x)$ = length of a variable
Why do we need a field for RSA and what are the two operations in this field? Why can't we have a ring or group for example? Because in a group you also have inverse elements.
Regular plain CTR mode, is it vulnerable to any attack? I plan to write a program to encrypt a drive with ctr mode. Would this be wise? Would AES be better? When I look at this diagram, it looks pretty solid to me. If the question is "too broad", allow me to rephrase: Which is better, AES 256 or CTR mode like the pict...
As far as I can tell (from reading the Wikipedia article about it) decrypting a message encrypted with the vigenère cipher is possible on paper. But what would happen if the message is encrypted multiple times with a set of different keywords? "Thwaites challenged Babbage to break his cipher encoded twice, with keys o...
I need to know what is exactly DHE_EXPORT cipher suite and why it is still supported by some servers. Is there any implementation or details about this weak crypto?
I was studying about 'Data Security' and I found out this one thing confusing. What is a message digest? I got it is the hash of the message. Is the message here referring to the plaintext or cipher text? I believe when using Digital Signatures, the message itself is also encrypted with a public key.
Suppose that the attacker knows the SHA256 values of integers $n, n+1, n+2 ... n+k$. $n$ is sufficiently big, so we do not expect to be able to brute force $n$ just by $\operatorname{SHA256}(n)$ itself. $k$ is very small compared to $n$. Is there risk that he can calculate $n$ in reasonable time?
I have deterministic random bit generator (DRBG) to generate a random numbers in which it is 10 byte value and I want to turn this algorithm twice, what is the probability to get the two random equal and what is the maximum time to try to get this result ?
Using the crypto_aead_aes256gcm functions from Sodium produces a ciphertext of "at most mlen (plaintext length) + crypto_aead_aes256gcm_ABYTES bytes (16 bytes) are put into c (ciphertext), and the actual number of bytes is stored into clen if clen is not a NULL pointer. The phrase "at most" is deceiving because, in tes...
Is there a way to recover the public exponent e (assume in this case it is in fact not public) used in an encryption if I know the following: Factorization of N : p and q one plaintext m and its encryption c = m^e mod N Obviously I can just bruteforce if e is small, but is there a more elegant way? (or just assume e ...
Brief rundown of how Apple Push Notifications (APN) work: Generate a keypair, generate a CSR for it Upload the latter to your Apple Developer account and associate it with your mobile app In the process, your CSR is signed and you get to download the certificate Connect to the APN server using the key + certificate, s...
Let's say we generate a sentence in a way like for example this: Fix an initial seed. Attach '1' at the end of the seed and compute sha256 of such a string. This hash is our first number. Now attach 2 at the end of the seed(instead of 1 like in the previous step) and compute sha256 to get our 2nd number. And so on. Wil...
For ECB, CBC, and CFB, padding is required when the plaintext does not fill out a complete multiple of the block size. However, I have heard that is good practice to pad all messages, even if the plaintext does fill out a complete multiple of the block size. What benefit does doing such a thing have? Does it increase s...
I know this applies to secure ciphers, but does this also apply to hashes?
For some $k$, let's say $p = 1+ \prod_{j=1}^k q( j)$, where $q(1)=2$, $q(2)=3$, if $p$ is prime, the diffie-hellman key exchange is not secure in cyclic group $Z^*_p$. Why?
Let's have $P$ some sensitive piece of data and $K_1$a secret value, both known to Alice, but not to Bob. $K_1(P)$ means $P$ encrypted using $K_1$. Alice sends $K_1(P)$ to Bob. Bob keeps the value of $K_1(P)$. Later Alice decides to change her keys. She needs to replace $K_1$ with $K_2$. The goal is to do some transfor...
NIST SP800-56B standard (addressing IFC-based Key Establishment schemes) defines some key establishment (KE) schemes using the RSASVE primitive in which the common secret $Z$ is encrypted with RSA-EP (basic RSA encryption without padding). I understood that RSA encryption should mandate one of the two padded schemes (...
Suppose I have a key that is at least 32 characters in length and provides at least 128-bits of entropy. If I picked from the character set of [a-hjkmnp-z2-9-], then I know that each unambiguous character provides exactly 5 bits of entropy if built from a CSPRNG, such as /dev/urandom. Thus, a 32-character string would ...
I'm working on my bachelor thesis and I have some questions. I want to combine a CPA-secure private key encryption scheme and some unforgeable public key signature scheme (in my case some sanitizable signature scheme but I think it doesn't matter). The resulting scheme should be CCA-secure. How can I do that? If I use...
How can I work out Hamming distance between two binary vectors securely? I would like to know how I can apply homomorphic techniques here.
OK, in school, some of the lecturers always say "if you compound the crypto, it may make the cipher weaker". So, which combinations of algorithms would do this? Why? Can anyone show the mathematical proof? For example, would RSAk1(AESk2[AESk3[x]]) make the encrypted x weaker? Assuming all keys used are different and ra...
I've given a CPA secure private key encryption scheme (wich gets to a CCA secure scheme or better to an authenticated encryption scheme, when i combine it with a given MAC) and a unforgeable public key signature scheme. I want to combine both to get an authenticated encryption scheme. My approach was to first sign the...
I'm currently looking at changing the padding type from one of the Oracle Padding attacks to a secure one. Would this break data already encrypted using the old method?
Suppose m = 5 and N = 64. How do I choose the coefficients such that the polynomial is a permutation of nos from 0 to 63.?
I'd like to transmit a small amount of data, typ. 4 - 16 Byte through a channel that can be eavesdropped at any time. The behaviour, the way the data changes, should be protected too. I could encrypt it using XOR with a 4 - 16 Bytes key like this: c = m x k This means c is the same for the same m. When observing the c...
I am sending a signed email using Python and smtplib. I have successfully signed the email using this example: http://proj.badc.rl.ac.uk/svn/ndg-security/branches/Dependencies/m2crypto/doc/howto.smime.html My question is how does the end user get the public key to check the signature? I have not seen any examples of at...
I need to construct an AES key from an array of bytes (in Java), but I first I have to check if the key created from these bytes would be weak. Java can check for weakness for DES, but not for AES. What are the criteria for an AES key to be considered weak?
I am sure this is a very easy thing to do but I am not sure how to go about solving a problem like this, So there is this hash function which operates on a message which is in the form of a byte array (each element is 8 bits long): digest [i] = ( (129 * message[i]) XOR message[i-1]) % 256 The value of message[-1] is 0...
I have a question regarding Reduction Functions in Rainbow Tables. If the hashing function is MD5 or SHA-1 etc then should the reduction functions also be MD5 or SHA-1? That is, should the Reduction Function be the same as the Hashing Function but of course with a different set of rules/constraints for input and outpu...
We all know we should NOT roll our self-designed encryption algorithm, how about block cipher mode with a certificated cipher method like AES? Will a self-designed block cipher mode cause any flaws or weakness to the cipher? I have search over the Internet but can't find a answer. Hope here is the right place to ask s...
I was wondering whether, theoretically, 2 files can have the same SHA-256 value. Since there are only $16^{256}$ or $2^{1024}$ SHA256 sums, all 1024-bit files (with $2^{1024}$ different combinations) will have to have different SHA256 sums (if I'm not mistaken). Additionally, for files with larger file sizes (such as, ...
I can't understand the ECIES algorithm. I saw two different ECIES algorithms: Using only Public key Key generation: $A_{pri} : n_A$ $A_{pub} : n_A G$ $B_{pri} : n_B$ $B_{pub} : n_B G$ Encryption: Select a random $k$. A -> B to Cipher C : $\{kG, \text{message} + k B_{pub}\}$ Decryption $\text{message} + k B_{pub} - n...
My question is about how the padding is formated in TLS1.0, 1.1, 1.2, 1.3 I came across the PKCS7 format for the padding: somedatawith3bytesleft 03 03 03 aaasomedatawith2bytesleft 02 02 aaaaaasomedatawith1bytesleft 01 But when you read explanation on TLS padding you will see this : somedatawith3bytesleft 02 02 02 a...
I am using AES-CBC, authenticating using HMAC-SHA512 and I was wondering whether my thought process and implementation are correct. The message send over the network is: HMAC(64Bytes),IV(16Bytes),Ciphertext The MAC is calculate as follows: HMAC(sha1(secretKey),Plaintext) Is there a significant reason to use SHA-512 ov...
From Should we MAC-then-encrypt or encrypt-then-MAC?, I understand I should do Encrypt-than-MAC, which the MAC included all the information such as IV and cipher text. After reading Why choose an authenticated encryption mode instead of a separate MAC?, I know reusing key in Encryption and MAC may trigger unwanted weak...
I am studying cryptography and various block cipher modes of operation. Suppose I changed one bit in the last block of the message. Wouldn't that imply no change in all encrypted blocks except for the last one? At least based on the description of how various modes work (CBC, OFB, etc), I don't see why that wouldn't be...
I am trying to figure out an encryption algorithm whose key schedule function seems to be similar to RC6. However, it seems to be creating S-Boxes using 16-bit integers instead of 32-bit ones. I have posted some pseudocode below which is filling the S-Box, S is an array of 16-bit values and so is S_, except S_ is 27 * ...
I am using Integer Vector Homomorphic Encryption for the encryption lib. I have to multiply a learning rate of 0.01 (i.e. between 0 and 1) by the encrypted data (vector) but it is not integer. I had wanted to multiply by 1/10 instead. Is it possible? because it is know that HE scheme doesn't support division. Is the a...
I'm not even sure of the appropriate terminology to use to describe my problem so bear with me if the explanation is not exactly formal. Imagine I have a simple digital calculator, with a screen and some buttons. I bring this calculator into a room full of people. I ask them each one by one to take the calculator and a...
Can one extend the ChaCha and Salsa20 nonces by XORing the extra nonce bits with the key? My reasoning is as follows: the Rumba compression function allows attackers to supply any 48-byte input to the core, and HS1-SIV (a CAESAR 2nd round candidate) explicitly assumes and requires that ChaCha20 be secure in the relate...
GPG signing of Git commit tags relies on the collision resistance of SHA-1, which is weak. However, the attacker does not get to choose the prefix. How much does this translate to an actual vulnerability?
Why we take (base $e$) and (base 2) in natural and discrete logarithm, respectively? I do not understand the difference between these two concepts.
OK, so I am a real noob at cryptography stuff and I have a set of files. One is a string that I am trying to decrypt, and the other has this SHA: 4534e95cb5f001719a6119a092459dc826965d60 Can I use this to decrypt the string I have? And if so, how? I probably sound really stupid but I need help.
Assume that there is a smartcard or other hardware token that exposes the raw RSA private key operation (modular exponentiation, with or without CRT parameters). Is there any possibility that raw RSA leaks information about the private key that would not otherwise become available? Please clearly distinguish between at...
Say party A wants to make sure they are communicating with party B, and not an eavesdropper E. Then they will use an authentication scheme to do this. But what if there is an eavesdropper on the line, who waits until the authentication is complete, and then steps in a poses as party B when it is finished? Then A will s...
The title pretty much sums it up :) I'm looking for a hashing algorithm that does not need to be cryptographically secure beyond reducing the number of accidental collisions. There is no need to protect against a determined attacker. Naively I thought I could take a file, cut it up into 1Gb chunks, hash each chunk indi...
I need 32 byte pseudorandom sequences that denote unique filenames and am currently using this Python code: import base64 import hashlib from django.utils import timezone from uuid import uuid4 def get_name(): data = str(uuid4()) + str(timezone.now()) hash = base64.b64encode(hashlib.sha256( d...
In the first block cipher I designed I used a CSPRNG to generate the round keys. The purpose was to at least have a chance of creating a (hopefully!) secure cipher on the first try (but please don't use it in production). One criticism I got was that the key schedule was too expensive. This made me wonder: what are t...
How polynomial based encryption schemes such as NTRU encode messages in to polynomials? Is there a generic conversion?
I know that the ChaCha20 core (without the initial constant) is not an ideal PRP and must not be used as such. I also know that $\text{ChaChaCore}(0) = 0$. Are there any other differences?
Alice and Bob are using DHKE in the group $\mathbb{Z}_p^ * $, where $p = 1031 = 2 \cdot 5 \cdot 103 + 1$. Their generator $g = 2$, which generates a multiplicative group of order $515$ in $\mathbb{Z}_{1031}^ * $. This group has a subgroup consisting of $5$ elements $\{ 1,518,264 = {518^2},660 = {518^3},619 = {518^4}\}...
Let's consider such process: Two emitents emit two (integer) secret numbers independently They encrypt (encode) these number in such a way that no-one (except emitent) can decode these numbers. Emitents also cannot decode/know numbers of each other. Now having two block of decoded numbers we need to find the sum of th...
I am working on a password manager application that saves the user's passwords in a remote server. I need to use AES in CTR mode to encrypt the passwords before sending them to the server. The client is supposed to login/identify himself with a master password (which is already set in the server). This is what I've tho...
I want to encrypt a message that contains a fixed length random number and a long mod. i.e. 1234564284 (created like this 123456 + (123456 mod 9931)) I assume that reusing the same key is not a problem if the message is purely random but is the fact that the message is always given with a mod is opening a hole to find...
If a stream cipher has an $n$-bit internal state, how many bits of known plaintext are required to confirm that particular key is the key? I believe that the answer is at least $n$-bit's of plaintext. My reasoning is that an $n$-bit state would allow it to generate at most $2^n$ different key-streams, assuming it was a...
An excerpt from the wikipedia article on slide attacks states: ...The only requirements for a slide attack to work on a cipher is that it can be broken down into multiple rounds of an identical F function. This probably means that it has a cyclic key schedule. The F function must be vulnerable to a known-plaintext at...
Let's say that you have a symmetric cipher which takes in an 8 bit plain text value and a key, and generates cipher text which can be decoded using the key to get the original plain text value. Since this is just an 8 bit plain text value, versus say some text document in english (or other source material where the for...
This is a bit of a cross-posted question which I first asked at StackOverflow, however I was not satisfied with stackoverflow, so I came here for an in depth answer. I, as they say, "rolled my own cryptosystem". It is a C# CTR encryption method, that is modified. Based off of this diagram: I hate the idea of padding, ...
In the book written by Ivan Damagard titled "Secure Multiparty Computation and Secret Sharing", at the end of the third chapter he provides a proof for why it is impossible to securely compute 2 party AND function under perfect and passive security with one corrupt party. Can someone help me provide an intuitive expla...
It is commonly understood that CRC satisfies the linear identity with respect to the $\oplus$ (XOR) operation: $\operatorname{CRC}(a) \oplus \operatorname{CRC}(b) = \operatorname{CRC}(a \oplus b)$ But after some experimentation and research it appears that this is not generally true. The particular algorithm in questio...
I want to create an app that encrypts a file and saves it to the Dropbox. Thus, I open and edit this file, I want the file is already decrypted, but the encrypted file that stored in Dropbox still in cipher text. Whenever I update/edit this file, encrypted file that stored in Dropbox also update. Is this possible?
Linux has the familiar problem that /dev/random blocks too much (insisting on being information-theoretically secure), while /dev/urandom doesn't block enough (it will return data before it's been adequately seeded). The new getrandom() system call does the Right Thing, but as of this writing it's not yet universally a...
If the 48-bit input to the S-box is 0xAAAAAAAAAAAA, what are the first four bits emitted by S-box 1? Answer: 0110 I know that an S-Box takes n inputs and give m outputs and that n != m, but I really don't see how they got that answer. Since a S-Box takes 3 bits and maps it to 2 bits how can you predict what AAA will be...
From Wikipedia's article on ECDH: The public keys are either static (and trusted, say via a certificate)… Also see this question on this very site. These indicate to me that a certificate (maybe an X.509 certificate) can have a(n) (elliptic curve) Diffie-Hellman public key as the data that is authenticated by it. Is ...
I am trying to compute the multiplicative inverse in galois field $2^8$.The question is to find the multiplicative inverse of the polynomial $x^5+x^4+x^3$ in galois field $2^8$ with the irreducible polynomial $x^8+x^4+x^3+x+1$. To get it I used the Extended Euclidean division but with operations used in galois field $2...
Consider a cyclic group $G$ of order $q$, and let $g$ be a generator for $G$. Assume $(G, q, g)$ is public. Consider the following 1-bit public-key encryption scheme. To $generate (pk,sk)$: $x \xleftarrow{\$} {1, , 2, . . . , q}$ $h ← g^x$ $pk ← h, sk ← x$ Return $(pk, sk)$ To encrypt the message $M = 0$, we define $...
Let $X,X',Y,Y'$ be some distribution ensembles such that $X\sim X'$ and $Y\sim Y'$, where $\sim$ means computational indistinguishable. Define $(X,Y)$ be the distribution ensemble over $\{0,1\}^{2n}$ for each $n$ such that $P[(X,Y)=(x,y)]=P[X=x]*P[Y=y]$ and $(X',Y')$ similarly. My question is: Does $(X,Y)\sim (X', Y')...
I am writing an application that uses Elliptic curve Diffie–Hellman for authentication. I found two formulas for point doubling in Jacobian coordinates. 1st) \begin{equation} X_1 = (3x^2 + aZ^4)^2 - 8xy^2 \end{equation} 2nd) \begin{equation} X_1 = (3 (x - z^2)(x + z^2))^2 - 8xy^2 \end{equation} The second formula is f...
I've given a CPA secure private key encryption scheme, an unforgeable private key MAC scheme and an unforgeable public key signature scheme. I want to combine them to protect confidentiality, integrity and authenticity. I have to use the signature scheme, such that some third party can prove authenticity and integrity ...
Why is the padded RSA construction given in the picture not CCA secure?
Within RFC 2104 section 3 there is discussion around keys (below). How are these keys agreed upon/distributed? Practically speaking is asymmetric crypto a requirement to "bootstrap" and distribute keys? "Keys need to be chosen at random (or using a cryptographically strong pseudo-random generator seeded with a rando...
It seems that RSA-KEM has a very troublesome method of generating the secret $r$. It seems that the random value needs to be in the range $0 \le r \le {n - 1}$. Now most cryptographic environments don't have a random number generator that generates those kind of numbers; usually they are just provided with a seeded DRB...
I want to create a system to host as securely as possible encrypted data in a way that not even the system can know the content of the data, but that it could be recovered. I would like to know how is it that other systems implement the use of a multiword recovery passphrase, like some bitcoin wallets for example, wher...
Is there anyway to detect encryption in real-time through a common signature or pattern recognition. Say, a file is being encrypted using an AES-256 cipher, if I have access to the file stream - can I reliably detect an encryption operation?
I've been looking into different ciphers that require very minimal computation power (calculator, deck of cards, index cards and a pencil), i.e. hand ciphers. For the most part all methods typically discussed are considered insecure with the advent of computers. Searching for patterns, testing against linguistic statis...
From the class: Shannon Theorem: For a perfect encryption scheme, the number of keys is at least the size of the message space (number of messages that have a non-zero probability). Proof: Consider ciphertext $c$. $c$ must be a possible encryption of any plaintext $m$. But, for this we need a different key per message...
If someone is signing a document using the ElGamal signature scheme, and if the random involved in the signature $k \mod (p-1)$ is equal to $a$ (the private key), can an attacker notice? If so can he then determine the value of $a$? Would it be because the $\beta = \alpha^a \mod p$ from the published key ($p$, $\alpha$...