public-key

Encrypt in Javascript, decrypt in PHP, using public-key cryptography

一个人想着一个人 提交于 2019-11-27 10:37:11
I'd like to encrypt in JavaScript, decrypt in PHP, using public-key cryptography. I've been trying to find libraries that can accomplish this, but am having issues. I am currently looking at openpgpjs , but I need support in all browsers, and even the test page has errrors on the only listed as supported browser (Google Chrome). Notes about the final goal: The TCP connection is already protected by SSL. The main purpose of this layer of protection is defending against intentional or unintentional webserver logging, crash dumps, etc. On the PHP side, a temporary private key will be generated

Getting the PublicKeyToken of .Net assemblies

这一生的挚爱 提交于 2019-11-27 10:10:57
What is the simplest way to find the Public-Key-Token of an assembly? The simplest way I can think of would be a simple right-click, get public key, but this functionality isn't there, maybe there is a Visual Studio Extension for that? I'm using Visual Studio 2010, if an extension is available. Open a command prompt and type one of the following lines according to your Visual Studio version and Operating System Architecture : VS 2008 on 32bit Windows : "%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\sn.exe" -T <assemblyname> VS 2008 on 64bit Windows : "%ProgramFiles(x86)%\Microsoft SDKs

X.509: Private / Public Key

£可爱£侵袭症+ 提交于 2019-11-27 10:08:51
问题 We're trying to implement some functionality of a Web-Service from one of our partners. Now, the content which is beeing transmitted, should be encrypted with a public key, which we have to provide. The security-specification says that the public-certificate has to be X.509 standard. Doesn't X.509 rely on the private / public key method? Because I only get one .pem file, containing a private key, and a certificate, but no public key, using the following command: openssl req -new -x509 -days

iPhone: How to create a SecKeyRef from a public key file (PEM)

不羁的心 提交于 2019-11-27 10:02:34
问题 In order to send and receive encrypted messages from/to the iPhone I need to read a public key (server's public key) PEM file and create a SecKeyRef (later I could even store it on the keychain in order not to create it again). This is my current workflow: On the server: Create a P12 file with the user's certificate and private key. Store the user's public key on the server's keychain. On the iPhone: Retrieve the P12 file from the server, use the password to open it and store the private key

JSch SFTP security with session.setConfig(“StrictHostKeyChecking”, “no”);

天涯浪子 提交于 2019-11-27 09:32:24
I use JSch with private key to FTP file jsch.addIdentity(privatekeyfile); Session session = jsch.getSession( "user", "domain.com" ,22); session.setConfig("StrictHostKeyChecking", "no"); Line 3 is in question. Without this line, JSch does not work. My question is: Will line 3 make SFTP transfer insecure? Disabling the StrictHostKeyChecking option will make the connection less secure than having the option enabled, because it will let you connect to remote servers without verifying their SSH host keys. If the option is enabled, you will only be able to connect to servers which keys are known to

key_load_public: invalid format

你。 提交于 2019-11-27 09:07:22
问题 I used PuTTY Key Generator to generate a 4096 bit RSA-2 key with a passphrase. I save the .ppk and an openSSL format public key. The putty format public key doesn't work. In any case, my error is as follows: $ ssh -T git@github.com key_load_public: invalid format Enter passphrase for key '/c/Users/Dan/.ssh/id_rsa': Hi Dan! You've successfully authenticated, but GitHub does not provide shell access. What's the issue? I use Pageant to load the keys and i use Git Bash to try the ssh connection.

RSA: Get exponent and modulus given a public key

≡放荡痞女 提交于 2019-11-27 06:05:18
I need to encrypt some data using RSA in JavaScript. All of the libraries around ask for an exponent and a modulus, yet I get a single public.key file from my opponent. How do you retrieve the public exponent and modulus part from an RSA file? Bruno It depends on the tools you can use. I doubt there is a JavaScript too that could do it directly within the browser. It also depends if it's a one-off (always the same key) or whether you need to script it. Command-line / OpenSSL If you want to use something like OpenSSL on a unix command line, you can do something as follows. I'm assuming you

Whose key is used to encrypt a HTTPS response?

て烟熏妆下的殇ゞ 提交于 2019-11-27 03:32:28
问题 I have a web server built up relying on HTTPS. So, my server maintains its private key and publish a public key that any clients can use to encrypt their request. Since my server is the only one who has the private key to decrypt any message encryped using server's public key, any request sent this way can be considered secure. However my question is at the response part. When the server sends the response back to the client, whose public key will the server use to encrypt the response

For RSA, how do i calculate the secret exponent?

别来无恙 提交于 2019-11-27 02:47:32
问题 For RSA, how do i calculate the secret exponent? Given p and q the two primes, and phi=(p-1)(q-1), and the public exponent (0x10001), how do i get the secret exponent 'd' ? I've read that i have to do: d = e -1 mod phi using modular inversion and the euclidean equation but i cannot understand how the above formula maps to either the a -1 ≡ x mod m formula on the modular inversion wiki page, or how it maps to the euclidean GCD equation. Can someone help please, cheers 回答1: You can use the

.ssh config with amazon ec2 and git

不问归期 提交于 2019-11-27 02:05:54
I have a strange problem with cloning a git repository from an amazon ec2 server. It works without any problems on one of my computers running ubuntu 12.04, while on another one using 12.10 it gives me an error: ssh: Could not resolve hostname ec2server: Name or service not known fatal: The remote end hung up unexpectedly It's like it is not recognizing my config file. I use the following git command to clone : sudo git clone ec2server:/var/www/project.git or sudo git clone ec2xxx.compute-1.amazonaws.com:/var/www/project.git The two config files are identical on both computers, inside the ~.