cryptography

RSA and prime-generator algorithms

女生的网名这么多〃 提交于 2019-12-20 09:44:06
问题 OK, my understanding of the mathematical workings of RSA may not be as deep as it should, so feel free to slap me over the head if this is stupid: To generate a private key, we need two random big primes. There is no algorithm that can do that precisely and efficiently, but there are algorithms that can generate big numbers that have a 99.99999...(a bazillion 9s)...999% probability of being prime. My question is: what happens if, by a phenomenal stroke of bad luck, when you were generating

.NET Private Key Rsa Encryption

扶醉桌前 提交于 2019-12-20 09:40:03
问题 I need to encrypt a string using an RSA 1.5 algorithm. I have been provided with a private key. However, I cannot for the life of me figure out how to add this key to the class. It seems as tho the key needs to be of type RSAParameter stuct. However this requires a set of values I have not been given such as Modulus, Exponent, P, Q, etc.. All I have is the private key. Can anyone help? 回答1: You should be aware of the Bouncycastle C# library. There are in particular two very useful classes:

Preventing dictionary attacks on a web application

不羁岁月 提交于 2019-12-20 09:37:13
问题 What's the best way to prevent a dictionary attack? I've thought up several implementations but they all seem to have some flaw in them: Lock out a user after X failed login attempts. Problem: easy to turn into a denial of service attack, locking out many users in a short amount of time. Incrementally increase response time per failed login attempt on a username. Problem: dictionary attacks might use the same password but different usernames. Incrementally increase response time per failed

How to connect to a database that requires password without exposing the password?

▼魔方 西西 提交于 2019-12-20 09:23:30
问题 I am creating an application and I need to connect to a database. The database requires login/password so the application can do operations like select and insert. In the application I need to connect to the database using login and password, so the application is free to do some tasks on the database. My question is: how do I store and use a password to connect to the database without exposing the password? I can't simply use a hash or encryption to store the password because the database

Why is it not possible to reverse a cryptographic hash?

心已入冬 提交于 2019-12-20 09:23:00
问题 Why can't you just reverse the algorithm like you could reverse a math function? How is it possible to make an algorithm that isn't reversible? And if you use a rainbow table, what makes using a salt impossible to crack it? If you are making a rainbow table with brute force to generate it, then it invents each plaintext value possible (to a length), which would end up including the salt for each possible password and each possible salt (the salt and password/text would just come together as a

Good Stanford Javascript Crypto Library (SJCL) examples? (JS cryptography) [closed]

为君一笑 提交于 2019-12-20 09:21:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am looking at a way to do client-side cryptography in Javascript (keeping http://www.matasano.com/articles/javascript-cryptography/ in mind) and have found SJCL. But I seem unable to find good code examples for it. Any pointers? 回答1: I did a presentation last year titled Developer's Guide to JavaScript and Web

Are there public key cryptography algorithms that are provably NP-hard to defeat? [closed]

我是研究僧i 提交于 2019-12-20 09:15:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Should practical quantum computing become a reality, I am wondering if there are any public key cryptographic algorithms that are based on NP-complete problems, rather than integer factorization or discrete logarithms. Edit: Please check out the "Quantum computing in computational complexity theory" section of

Code Signing Certificate Options

♀尐吖头ヾ 提交于 2019-12-20 09:05:13
问题 I've been assigned the task of buying a digital certificate for my company to sign our code. We develop applications in the Microsoft space - mostly WPF or Web Based. I've investigated options and found Comodo to be well priced and responsive, and we're ready to go ahead and purchase a cert through them.. however in the signup form there are various private key options that I'm not too sure about, namely: CSP Microsoft Base Cryptographic Provider Microsoft Base Smart Card Crypto Provider

Save and load crypto/rsa PrivateKey to and from the disk

微笑、不失礼 提交于 2019-12-20 08:27:31
问题 I'm using crypto/rsa , and trying to find a way to properly save and load a key. Is there a correct way to create a []byte from an rsa.PrivateKey . If so, is there a way to properly do so for an rsa.PublicKey ? Thank you all very much. 回答1: You need some sort of format to marshal the key into. One format supported by the Go standard library can be found here: http://golang.org/pkg/crypto/x509/#MarshalPKCS1PrivateKey func MarshalPKCS1PrivateKey(key *rsa.PrivateKey) []byte The inverse function

Quantum Computing and Encryption Breaking

不羁的心 提交于 2019-12-20 08:14:02
问题 I read a while back that Quantum Computers can break most types of hashing and encryption in use today in a very short amount of time(I believe it was mere minutes). How is it possible? I've tried reading articles about it but I get lost at the a quantum bit can be 1, 0, or something else . Can someone explain how this relates to cracking such algorithms in plain English without all the fancy maths? 回答1: Preamble: Quantum computers are strange beasts that we really haven't yet tamed to the