passphrase

Generate RSA key pair using WebCrypto API and protect it with passphrase

ε祈祈猫儿з 提交于 2019-12-06 11:09:08
问题 title says it all. I was wondering how do I generate RSA key pair using WebCrypto API and how do I secure it with a passphrase so I can store it in a database. 回答1: You can generate an RSA key pair with WebCrypto and export it as jwk (Json Web Key), pkcs#8 (private) or spki (public). See SubtleCrypto.exportKey() and the example code bellow To export the key to an external system in a protected way you could use an standard like: PKCS#8: The PKCS#8 private key format defined at IETF Public Key

How can I force GPG to accept input from STDIN instead of trying to open a file?

此生再无相见时 提交于 2019-12-05 19:34:16
I am trying to incorporate GPG clear-signing of text in a string in a PHP script. I can cause GPG to encrypt text in a string like this: $encrypted = shell_exec("echo '$text' | gpg -e -a -r foo@bar.com --trust-model always"); and that works perfectly, with the encrypted text being sent to the $encrypted variable. This proves GNUPGHOME and GNUPG are set up correctly. However, when I try to produce a clear-signed message in the same way with this: $text = "googar"; $signature = exec("echo $passphrase | gpg -v --clearsign --no-tty --passphrase-fd 0 '$text' 2>&1 1> /dev/null", $output); I am

Generate RSA key pair using WebCrypto API and protect it with passphrase

不问归期 提交于 2019-12-04 15:33:05
title says it all. I was wondering how do I generate RSA key pair using WebCrypto API and how do I secure it with a passphrase so I can store it in a database. You can generate an RSA key pair with WebCrypto and export it as jwk (Json Web Key), pkcs#8 (private) or spki (public). See SubtleCrypto.exportKey() and the example code bellow To export the key to an external system in a protected way you could use an standard like: PKCS#8: The PKCS#8 private key format defined at IETF Public Key-Cryptographic Standard Encryption #8. allow encryption with a passphrase, but WebCryptography exportKey

How to reset or change the passphrase for a GitHub SSH key?

丶灬走出姿态 提交于 2019-12-04 07:42:10
问题 I have forgoten my passphrase in Git. How do I reset it? I found two solutions on Stack Overflow, but I want to know what process to follow to reset it or to get it. 回答1: You can change the passphrase for your private key by doing: ssh-keygen -f ~/.ssh/id_rsa -p 回答2: In short there's no way to recover the passphrase for a pair of SSH keys. Why? Because it was intended this way in the first place for security reasons. The answers the other people gave you are all correct ways to CHANGE the

Java git client using jgit

守給你的承諾、 提交于 2019-12-03 07:00:20
I am having some difficulties with a git client written in java. I am using the jGit library to connect through ssh on the git server. The problem is that i don't know how to specify the path to the private key and the passphrase for it. I couldn't find any examples in the jGit documentation about what functions i need to call. From what i read the jGit library is using JSch to connect to the server using ssh and JSch supports private keys and passphrases. Does anyone have any experience with this or has some working code? Thank you I didn't ever use jGit, but from looking at the Javadocs

ssh key passphrase works in windows but not in linux

时光毁灭记忆、已成空白 提交于 2019-12-03 05:33:49
问题 I'm working to a project in git. In Windows, I'm using git extensions to manage this project, and to access to the public repository they gave me a .ppk key. I load it into git extension, with the passphrase that they gave me, and it works. Now I set a linux (ubuntu-32bit) virtual machine, and I want to access also from this machine to the repository. From another thread that I've seen in this site, I use, to clone the repository, the following command: ssh-agent bash -c 'ssh-add /home/myHome

SSH: “Bad passphrase” after generation of public key

主宰稳场 提交于 2019-12-03 04:44:39
When I execute these commands (setting a passphrase, after the first)... $ ssh-keygen -t dsa $ chmod 600 my_key $ chmod 600 my_key.pub ...and then, to test the passphrase... $ ssh-add my_key.pub ...I keep getting: Bad passphrase, try again for my_key.pub: Bad passphrase, try again for my_key.pub: Bad passphrase, try again for my_key.pub: Bad passphrase, try again for my_key.pub: ... What am I doing wrong? You're trying to add public key to the agent, that one isn't pass-protected, the private one is. Try adding your private key and it should work. 来源: https://stackoverflow.com/questions

How do you generate passwords? [closed]

会有一股神秘感。 提交于 2019-12-03 01:41:17
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings 回答1: Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to choose

How do you generate passwords? [closed]

旧时模样 提交于 2019-12-02 15:10:38
How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to choose password style (memorable, numeric, alphanumeric, random, FIPS-181) and choose the length. It also warns you about weak passwords. Arul S Use this & thumps up :) cat /dev/urandom | tr -dc 'a-zA-Z0-9-!@#$%^&*()_+~' | fold -w 10 | head -n 1 Change the head count to generate number of passwords. A short python script to

GPG automatic decryption password passing

余生长醉 提交于 2019-11-29 08:37:50
We receive GPG encrypted files from a third party. I'm modifying a C# program that finds the encrypted files, decrypts them, and deletes the encrypted ones. It all works except during the decryption part it prompts for a phassphrase; I know the passphrase and it works when entered. I need to pass the passphrase in the command so the prompt never appears. string CommandText = string.Format("echo {0}|gpg.exe --keyring {1} --secret-keyring {2} --batch --yes --passphrase-fd 0 -o {3} -d {4}", passPhrase, publicKeyRingPath, secretKeyRingPath, outputFullPath, encryptedFilePath); I have also tried: