Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I am needing to encrypt this hash using the RSA algorithm with the following public key
Hash
af7c19d5b0b58568e77ccb4ca7530ca1a68d087e11911ff7ac4899ef3e177aff
Public Key
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqTqckpLgyBqa53dv5MgW
qwYu0toPqdZc5+46IYsaB1GsAiVniW/6hnnITemI1VRybTO5zSyBpeRmo3KnImbr
3nD/xMi8VhcVcsa1GGRuoYRET+h5xbwuzYUryp04sFn47faV2TIuFvnsIkNnuY1K
r73DnnnXeglyN+obVoj5wZ8z8HH45Dk2CcHJpy9UM6zw0s4H2vutbAyxP2gaNZkO
YUUdxfoQ9/xXgce1TDpgairrOKC7t6drQQF3S32KZeV8hZiV+TZGyjXuuviqXU7m
+0WUYXwP49yZnIWizSu5Zojv/U1ip2ZxmJXBlhPAtFvND3uiKBcoxDr0tzluznjF
wCU6CFvYsboFksUAXZkvN4RwFjo82DpHpm9qYgGS82LQJpyhGP+EiTNLKIUNk7+V
778p9sweRI39Hrs3vhxfkNF8QjxkRFyxcz/THjHTJhKvjU4FycpEgDnBqWnk9OpO
S1ZvFblPSv+LT2NvfPb0n1BpcdJycf6C7RKG/307dBjKHHJxItCWZ6FrmKW7/Kvn
NHxPzXfTDMX/F4dEOYAjFl/WUpQFx7SN4PaNiYNWlTBd2aJQd7VdJytc/a3/KGta
1kgUuSlLN5UR4lgTPZchqhSE1UwOfpG1f8rpZ5N8lf/EWO3R5gy2Zo48eBdfkBZ5
R9VhZ2QIZJ1xpJYfmmjp0T8CAwEAAQ==
-----END PUBLIC KEY-----
Ive attempted to use OpenSSL, but continue to be told "cannot load public key"
Is there another way?
You have an extra space at the start of your public key, right before ---- BEGIN.
Remove that, and it works.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
So yeah, different modulus(n), same exponent(e), different encrypted messages(C). Can I do anything with that to find the original messages(M) ? Thank you !
Sure. You can factor the modulus, altho for real world RSA keys, that's not gonna be very practical.
More seriously, 99% of all RSA keys use 65537 as the exponent. If a common public exponent were a weakness 99% of all RSA applications would be vulnerable.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I have an encrypted code and decrypted code how to know the algorithm?
encrypted code of "A" is "bc1M4j2I4u6VaLpUbAB8Y9kTHBs="
encrypted code of "B" is "rk8oHfWl0P88rWNx921cKbbZU+w="
encrypted code of "C" is "MglsLg7/M9hE7m1nVAes4YKJNX0="
I am making an application which must use that algorithm I have only encrypter software that creates the code but I don't know the algorithm.
How do I know the algorithm?
It's a SHA1 base64 hash algorithm
See this Ruby code
require 'digest/sha1'
puts Digest::SHA1.base64digest 'A'
# bc1M4j2I4u6VaLpUbAB8Y9kTHBs=
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I got this question in a local hacking event, but I couldn't solve it.
Problem Statement ----
Continuing their snooping habit, NSA kept bugging Alice's communication. Resorting to the age old RSA encryption, Alice used 128-bit RSA encryption to exchange messages. Alice shares her public key as
$0xffffffa95256a837568a41c265f4fe27110814aae19f144762d5cc0bcb931807$
and her public key exponent $\phi(n)$ as $0x11$ with Warden.
However, NSA, with its enormous resource, cracked this 128 bit encryption super easily. Seeing your work on the previous ciphers, NSA decided to offer you a job in their Cryptography group. As a final test, NSA shared this public key which they intercepted from Alice and Warden's conversation. They also gave away the private key that they computed from their message exchange.
$Public$ $Key -
(0xffffffa95256a837568a41c265f4fe27110814aae19f144762d5cc0bcb931807,
0x11)$
$Private$ $Key -
(0xffffffa95256a837568a41c265f4fe27110814aae19f144762d5cc0bcb931807,$
$0xc3c3c3817b3335577e69b9d0e48e2bc1fdf71f1f4f73a38a7d628d39739bbaf1)$
What are the values of $p$ and $q$? (the prime numbers used in key generation)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Can I decrypt a message using only a public key?
I have just have 2 file (message.enc , public.pem)
I've tried to decrypt the message.enc and i haven't the private key.
No. That's what private and public keys are used for. The public key is usually used for encryption and the private key is required for decryption.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
What is the key size of the SHA512 hashing algorithm? I know that the final message digest is 512 bits. I would like to know what key size it uses. Thank you very much :)
Hash functions does not use key. It just map any input to one of 2^512 possible values.
What key? There is no key. It's a hashing algorithm, not an encryption algorithm.