public-key

Setting up OpenSSH for Windows using public key authentication

爷,独闯天下 提交于 2019-12-02 15:13:42
I am having issues setting up OpenSSH for Windows, using public key authentication. I have this working on my local desktop and can ssh with a key from Unix machines or other OpenSSH for Windows machines. I have replicated the build onto a server, I can get password authentication working fine, but when I use the keys I get the following issue: debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup

How to let TortoiseHg (Mercurial) on Windows use the Private Key file generated (by Puttygen)?

谁说胖子不能爱 提交于 2019-12-02 14:16:58
I have used Puttygen to create a public and a private key, and then is ready to let TortoiseHg on Windows 7 do a clone by going to ssh://somebody@code.somewhere.com/somecode but there seems to be no where to add the private key to TortoiseHg? (or even just the mercurial command line) The file is already some where on hard disk as somefile.ppk Does someone know how to add it? Either add the following to the [ui]-section of the mercurial.ini in your home directory (assuming your key is in "C:\Users\UserName\mykey.ppk"): [ui] ssh = tortoiseplink.exe -ssh -i "C:\Users\UserName\mykey.ppk" or use

Github permission denied: ssh add agent has no identities

北战南征 提交于 2019-12-02 13:54:06
This is my first time accessing github and I'm not experienced using console. I'm on a Macbook (using Bash). When I try to access github, I get this: git clone git@github.com:dhulihan/league-of-legends-data-scraper.git Cloning into 'league-of-legends-data-scraper'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. I've tried following the instructions on Github page about Permission denied When I use ssh -vT git@github.com, I get the following: OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

JAVA AES 256 & Public Key Encryption [closed]

▼魔方 西西 提交于 2019-12-02 11:14:14
One of our customers requires us to encrypt a message return from our web service using AES 256 & Public Key Encryption Server Side (web service) is java based. Client side could be java or .Net. I'm not familiar with any of the encryption methodology and could not find any example that will get me started... Can this even be implemented AES 256 & Public Key Encryption ? How does it work (Public Key Encryption) ? Please direct me to an example that will get me started. AES256 is a specific symmetric encryption scheme, which requires the communicating parties to have pre-shared an encryption

PHP openssl_public_encrypt “key parameter is not a valid key”

◇◆丶佛笑我妖孽 提交于 2019-12-02 08:28:23
问题 I have my public key in a file named , publickey.key and the content of that file is this, MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtixUGzGpLXgZ7AV1HfmIHV/FEF+fww77FekRc2oLhUOd4HitwCPo76fjtdsQBEt8w9HZ3CXVphaAU2BA6MEZJ3ShVMsdAXb2ZA1C+lu7k1GV9M/BhucTg35HujSK647Sc5MwVLwFsN80dAnGsZF8gwb2TNUzXHwzbAb30T01zuqf8RCM75OwKZFYqzu7FOVrtk/w9mh92MOXG0l7WSqNIctu8Kxka/tEJJIA5nqMGNMocjwprXy66NS7FFy1GY+NnxfFLtODqq0tllc50UCDsnqSvNmj2wcnAcsCzNOoxPPgp7t8S+sQvOzgc5W3CDjIsYEiGD+vzSVNkGiRou577wIDAQAB /////// And

ECC private key is longer than public key

旧城冷巷雨未停 提交于 2019-12-02 07:44:51
I have generated ECC public and private key using secp192r1 curve. I get 75 for public and 125 for private encoded key array length. Why private key is longer than public key? Why private key is not longer two times than public? Why private key is not 192 bits = 24 bytes because of secp192r1? Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); ECNamedCurveParameterSpec ecSpec = ECNamedCurveTable.getParameterSpec("secp192r1"); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", "BC"); g.initialize(ecSpec, new SecureRandom()); KeyPair pair = g.generateKeyPair()

How to prevent a man-in-the-middle attack in case of a compromised server?

泄露秘密 提交于 2019-12-01 22:29:08
Imagine that a server is serving public keys of the users to their partners to make encrypted communication possible. However, the server does NOT have access to the private keys.. Anyway - imagine the server is hacked and it sends not the requested public keys: Alice requests Bob's public key Server sends Eve's public key Bob requests Alice's public key Server sends Eve's public key Alice sends a message to Bob Server unpacks message, reads it and repacks it -> sends to Bob... Bob sends a message to Alice Server unpacks message, reads it and repacks it -> sends to Alice... My question is -

Android-Java RSA decrypt

心已入冬 提交于 2019-12-01 14:47:40
i need to create a public key for RSA algorithm from a binary string. My code is: String pubKey = "tihq/Gk3OUs5NzP+XTRKXBwSxHtB0TWn0RREcpXEtp316tyD9DzKaIbdKexb/mRr"; byte[] keyBytes = Base64.decode(pubKey,Base64.DEFAULT); //test if is correct: ok Log.d("response keyBytes",new String(Base64.encode(keyBytes,Base64.DEFAULT))); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes); RSAPublicKey publicKey = (RSAPublicKey) keyFactory.generatePublic(spec); //PublicKey publicKey = (PublicKey) keyFactory.generatePublic(spec); But i have this

Android-Java RSA decrypt

≡放荡痞女 提交于 2019-12-01 13:21:36
问题 i need to create a public key for RSA algorithm from a binary string. My code is: String pubKey = "tihq/Gk3OUs5NzP+XTRKXBwSxHtB0TWn0RREcpXEtp316tyD9DzKaIbdKexb/mRr"; byte[] keyBytes = Base64.decode(pubKey,Base64.DEFAULT); //test if is correct: ok Log.d("response keyBytes",new String(Base64.encode(keyBytes,Base64.DEFAULT))); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes); RSAPublicKey publicKey = (RSAPublicKey) keyFactory

Erlang - Importing GPG Public Key

我与影子孤独终老i 提交于 2019-12-01 10:55:23
I'm trying to do some public-key-related things in Erlang, and they require me to track public keys. According to this page , I should be able to import PEM format keys by using file:read_file/1 and public_key:decode_pem/1 . The thing is, when I try to import a GPG public key, I don't get a result. I've got a file called inaimathi.pubkey with the following content: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux) mQINBE9NBIQBEADMSzN6b0FaPP0rGiLDWKfH4ehN66Z0SAIynXm6lBHjmO69pNsm iIe4p1X9aXhr7EgEZKdbqevfXW7NuA/oL7Rbt+tzBT5nS2cYSHoZhUC/onVhJxUb drCR9NsBDZc1wZs