encryption-asymmetric

how do I encrypt data in R?

爷,独闯天下 提交于 2019-12-18 12:52:58
问题 I am adding a sentry handler to the R logging package. currently django-sentry validates the client (the application sending log records) based on a shared key which travels in clear text in a secured channel. I was wondering if it was possible to do encryption from R, preferably asymmetric, public key based, but I find nothing relevant. all right, not "if it was possible", but "how to do that" and whether someone already did this. after interaction with the author of django-sentry, we opted

Java RSA Encrypt - Decrypt .NET

≯℡__Kan透↙ 提交于 2019-12-18 12:29:40
问题 I am encrypting on JAVA using RSA and attempting to decrypt using .NET. I am including my JAVA code and .NET code in hopes that someone has some experience with this sort of thing. JAVA Code: byte[] modulusBytes = Base64.decode("xTSiS4+I/x9awUXcF66Ffw7tracsQfGCn6g6k/hGkLquHYMFTCYk4mOB5NwLwqczwvl8HkQfDShGcvrm47XHKUzA8iadWdA5n4toBECzRxiCWCHm1KEg59LUD3fxTG5ogGiNxDj9wSguCIzFdUxBYq5ot2J4iLgGu0qShml5vwk="); byte[] exponentBytes = Base64.decode("AQAB"); BigInteger modulus = new BigInteger(1,

Asymmetric Encryption

跟風遠走 提交于 2019-12-18 11:58:01
问题 I have an exam tomorrow in Advanced Development, but I am stuck on the topic of Encryption. I have read up on it at http://support.microsoft.com/kb/246071. However I am still confused. If a message is encrypted using Asymmetric Encryption, using the public key, how is the decryptor going to know the private key with which to decrypt it? Surely the only way to do this is to make the private key public, but that defeats the object of Asymmetric Encryption. Can someone please explain this in a

how to use RSA to encrypt files (huge data) in C#

╄→гoц情女王★ 提交于 2019-12-17 05:37:25
问题 I'm new to encryption. I need to implement asymmetric encryption algorithm, which i think it uses private/public key. I started using a sample of RSACryptoServiceProvider. it was ok with small data to encrypt. But when using it on relatively larger data "2 lines", i get the exception CryptographicException "Bad Length"! //Create a new instance of RSACryptoServiceProvider. using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider()) { //Import the RSA Key information. This only needs

How to encrypt/decrypt XMl wiith X.509 certificate correctly?

五迷三道 提交于 2019-12-14 02:25:00
问题 I want to encrypt a XML file by using a X.509 certificate and also decrypt it, too. As far as I know I need to use the public key (inside the certificate) to encrypt the XML and the private key to decrypt the XML. Thus only the guy with private key is able to read the decrypted data. Microsoft provides some code for encryption/decryption here: Encryption: https://msdn.microsoft.com/en-us/library/ms229744(v=vs.110).aspx Decryption: https://msdn.microsoft.com/en-us/library/ms229943(v=vs.110)

How to import a bitcoin private key to BigInteger?

好久不见. 提交于 2019-12-13 07:59:03
问题 I use the following codes to try to import a bitcoin private key and compute the public key. The computed ECPublicKey is not equal to bitcoinPublicKey. How to correct? string bitcoinPrivateKeyStr = "cVnb9S9GgHxsBxfaApvGnWvfwqXRYdV8f1Q2CkQeBa4EsWTNmsGS"; BitcoinSecret bs = new BitcoinSecret(bitcoinPrivateKeyStr); byte[] bitcoinPrivateKeyBytes = bs.PrivateKey.ToBytes(); byte[] bitcoinPublicKeybytes = bs.PubKey.Decompress().ToBytes(); X9ECParameters curve = SecNamedCurves.GetByName("secp256k1");

Symmetric and public key encryption

旧城冷巷雨未停 提交于 2019-12-13 03:08:07
问题 Suppose N people want to communicate with each of N- 1 other people using symmetric key encryption. All communication between any two people, i and j, is visible to all other people in this group of N, and no other person in this group should be able to decode their communication. How many keys are required in the system as a whole? Now suppose that public key encryption is used. How many keys are required in this case? I have found two answers for symmetric that state it is either n(n-1)/2

Javascript + PHP Encryption with pidCrypt

删除回忆录丶 提交于 2019-12-12 17:21:23
问题 I have been working on trying to implement an encryption mechanism for passing secure information on my website. My host charges extra for SSL, and I am not ready for the extra monetary commitment. I tried to use pidCrypt to encrypt the values on the client side via javascript. Then, I have tried several techniques for unencrypting on the PHP side. For some reason, the data just gets garbled. Can someone point out what I am doing wrong? Or, should I use a different javascript library for the

openssl phishing : V claims to be A

怎甘沉沦 提交于 2019-12-12 03:07:33
问题 there are several components of my application, needs their communication secure in the sense Origin Verified. these components cannot share a common secret. So I have to opt for asymmetric key encryption. assuming I've two components A and B A sends some data F to B and B has to verify that it really came from A A generates digest H of F with its private Key A attaches A_pub , H to its request Parameters, sends F and declares origin/sender as A B verifies the digest H with the A_pub provided

Encrypt Data using Public Key

ぃ、小莉子 提交于 2019-12-12 02:25:04
问题 $key = file_get_contents('http://keyserver.pramberger.at/pks/lookup?op=get&search=uid'); after getting public key in '$key' variable i need to encrypt the data using this public key. the key must be start with ----Begin pgp block ---to end pgp block----. How this can be done in php? 回答1: Maybe this article about Encryption and Decryption using PHP and GnuPG (found via Google) helps you. And there is also a PHP module to interact with GnuPG. Afaik, GPG is compatible with PGP. 来源: https:/