public-key-encryption

Public key implementation in C for Linux

与世无争的帅哥 提交于 2019-12-21 19:55:08
问题 I'm trying to use public key crypto to sign and later verify a file. The file is a simple plaintext file that contains user information for authoring purposes. I tried different sites for a C implementation of a public key crypto algorithm but I haven't found anything. A lot of sites point to using certificates (x.509, etc) but that is way beyond what I need. I am just looking for a way to generate and public and private keys and use a relatively well known algorithm to sign and verify a file

Authentication with public keys and cx_Oracle using Python

一笑奈何 提交于 2019-12-21 16:50:22
问题 I've Googled a bit but I haven't found any substantial results. Is it possible to use key-based authentication to connect to an Oracle server using Python? My objective is to be able to automate some reporting I'm doing with Python without having to store a username/password anywhere in the server. 回答1: One possible solution is to implement Oracle Wallet. Creating an Oracle Wallet entry involves having: a tnsname resolution name established for the said instance a username and password

Authentication with public keys and cx_Oracle using Python

自闭症网瘾萝莉.ら 提交于 2019-12-21 16:50:17
问题 I've Googled a bit but I haven't found any substantial results. Is it possible to use key-based authentication to connect to an Oracle server using Python? My objective is to be able to automate some reporting I'm doing with Python without having to store a username/password anywhere in the server. 回答1: One possible solution is to implement Oracle Wallet. Creating an Oracle Wallet entry involves having: a tnsname resolution name established for the said instance a username and password

Seckey from public key string from server in Swift

大城市里の小女人 提交于 2019-12-21 05:10:27
问题 I want to encrypt data using RSA , I tried to generate the key in my code and it's working , But what I actually need is to get the public key as a string from server and then use it as Seckey so I can use it to encrypt data using RSA, I tried this code: //KeyString is the string of the key from server let KeyData = (keyString as NSString).dataUsingEncoding(NSUTF8StringEncoding) as NSData! var cert : Unmanaged<SecCertificateRef>!; var policy : Unmanaged<SecPolicy>!; cert =

How is SSH_AUTH_SOCK setup and used by ssh-agent?

巧了我就是萌 提交于 2019-12-21 03:16:13
问题 I have been able to setup the sharing of ssh-agent for public-key authentication after reading https://superuser.com/a/230872/301446 The environment file thus generated has the following contents: SSH_AUTH_SOCK=/tmp/ssh-OwqeSuxmEsQN/agent.4744; export SSH_AUTH_SOCK; SSH_AGENT_PID=8960; export SSH_AGENT_PID; #echo Agent pid 8960; And agent.4744 has: !<socket >24194 s 07DF88C6-E9997283-4C471010-2FE57D77 Would you know how this socket is used by ssh-agent? I can understand that it's used by ssh

RSA 2048 Encryption Decryption - Exception

那年仲夏 提交于 2019-12-21 03:12:18
问题 I am trying to encrypt and decrypt the data with RSA 2048. We have one public key and private key and will be using same throughout. but the problem is, when I decrypt, I am getting javax.crypto.BadPaddingException: Data must start with zero File file = new File("C:\\temp-ldi\\pubkey.txt"); FileWriter writer = new FileWriter(file); file.createNewFile(); encryptedText = RSACrypto.encrypt("PLAIN TEXT"); //no argument of pub-key, generate key pair writer.write(new BASE64Encoder().encode

java.security.InvalidKeyException: Key length not 128/192/256 bits

做~自己de王妃 提交于 2019-12-21 02:46:17
问题 I am new to Java and was trying to use Hybrid cryptography using AES-128 Symmetric encryption and then RSA-1024 Asymmetric encryption on the generated symmetric key. Can someone help why I am getting this exception. I have already followed the other posts, and downloaded the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files version 6 in the appropriate folder. Code snippet: import java.io.BufferedReader; import java.io.InputStreamReader; import java.security.Key;

gpg: Sorry, no terminal at all requested - can't get input

南笙酒味 提交于 2019-12-21 02:07:09
问题 When decrypting I get following error: $ eyaml decrypt -s 'ENC and the key goes on here' .gnupg --quiet --no-secmem-warning --no-permission-warning --no-tty --yes --decrypt) failed with: gpg: Sorry, no terminal at all requested - can't get input I have checked my keys, everything is in order. At this point I am out of options. 回答1: If you configured Automatic Git commit signing with GPG on macOS and you see this error comment out no-tty in ~/.gnupg/gpg.conf as suggested by Fahl-Design. This

.NET implementation (libraries) of elliptic curve cryptography

半腔热情 提交于 2019-12-20 17:37:33
问题 Please can you suggest any implementation of elliptical curve cryptography to be used on .NET platform? Also if you have used them, can you tell me the recommended curves that should be used? [EDIT] As @FatCat mentioned, its implementation is available in .NET framework 3.5 but that is only available on windows vista. Can you please suggest another way/library to use it? 回答1: Check out the Bouncy Castle library for C#, it has ECDH and ECDSA. 回答2: The .NET Framework already includes Diffie

Can we have multiple public keys with a single private key for RSA?

自古美人都是妖i 提交于 2019-12-20 16:19:48
问题 Can we have multiple public keys associated with a single private key for RSA public-key encryption? 回答1: In practice and with respect to security, no, mathematically, yes. If you have a private key (N, D), there is algebraically an infinite number of solutions to the equation 1 = E*D (mod Phi(N)). However, if you make two such solutions (E, N) and (E', N) that both satisfy the equation public, you will have compromised the secrecy of the private key. However given one of the usual asymmetric