Tag Info

New answers tagged

2

It is quite possible to create a stronger RNG using the suggested method, however it is also possible to create a weaker RNG, or one that does not improve. The end result depends on the properties of the weaker RNGs. Bit distribution and bias has just as much effect as the entropy level. Only careful analysis and knowledge of the entire scheme can tell if ...


1

The quick but overly vague answer to your original question is: Yes. However, as most people have indicated: more secure != secure. The purpose behind RNGs/PRNGs is to produce sufficient entropy to make it infeasible for an attacker to guess enough information to recover sufficient protected data. Most sources of entropy are tested to determine whether ...


2

This probably sounds like snark, but your solution only improves the situation if the two PRNGs are themselves chosen with sufficient randomness. Think of the reason that we consider a weak PRNG to be insecure: the result is statistically easy to guess some/all of, resulting in crypto and other operations that can be attacked by knowing part of the input ...


1

Unless one is perfectly random, the end results is unclear. But if one were perfectly random, it would not be weak any more. Edit: Unless you're sure the two are completely independent of each other, the benefits may be unclear.


1

The host has a key pair, consisting of a public key and a private key. (It can have multiple key pairs in different formats; at the beginning of a connection, the client and the server negociate to determine a format that they both support.) There's a host public key and a host private key; there are also other key pairs (public and private keys) which are ...


2

The difference between the two keys is that the Master key (PMK) is supposed to be valid for at least as long as the client is connected. In the case of WPA-PSK, the PMK is the same from the moment the AP is configured until either the passphrase or the SSID changes. Therefore, if the PMK is compromised in any way, the attacker gains "permanent" access to ...


0

You can use the HSM to store and manage your keys but you should also be able to use the HSM to perform encrypt and decrypt functions on behalf of your database or application. It depends on the functionality available on the HSM you have or are considering using. Here are a some examples of how you could use it: 1) Store a symmetric encryption key within ...


0

MSDN Data Encryption and Decryption Functions You choose what algorithm to use. You have to use CryptAcquireContext to get a handle to the Crypto Service Provider. Then call CryptGenKey to generate an encryption key object. This function is where you define the algorithm you want to use. You need to also call CryptCreateHash to create a handle to a hash ...


0

The data in the cert is hashed and the hash is sighed with C's private key. C's public key is in the cert. All of this is hashed and signed by a CA's key. Changing the subject changes the hash, the new cert is bad without even verifying the first signature.


0

It depends on the individual malware, but normally a random symmetric key is generated on the machine (which is used to encrypt the files), which is then encrypted with an asymmetric public key embedded within the application. This encrypted key file is kept locally on the system, but it is useless unless you have the private key to recover the symmetric ...


1

The reason AES-CBC isn't an authenticated mode has everything to do with the CBC and nothing to do with the AES. CAST5-CBC isn't inherently authenticated either; changing one bit in the IV changes the corresponding bit in the first block, and there's no way to detect it, because that's a result of the CBC construction and not of the cipher.


3

Answer depends on your security model. Classically, a cryptographic hash function has three properties: It resists preimages: given y, it is infeasible to find x such that h(x) = y. It resists second preimages: given x, it is infeasible to find x' such that x ≠ x' and h(x) = h(x'). It resists collisions: it is infeasible to find x and x' such that x ≠ x' ...


-1

Why not just use a CRC-token? or alike. without knowing what it is you are securing against with the hash no-one can tell you what to do (and the least amount of data added for verification the better for speed). truncating a hash does not help in general. because all you do is expose more of it to collision attacks.


1

I think the link you provided above is one off--check here instead, which covers key import (what you need to start with). In short, you'll invoke BCryptImportKey or BCryptImportKeyPair, depending on if you're dealing with symmetric or asymmetric keys. Once imported, use the various functions provided in CNG, probably starting with BCryptDecrypt and ...


0

The blinding mechanism blinds a random value. The amount is in the signature, eg the bank uses a key X for a 100$ bill, a key Y for a 200$ bill, a key Z for 300$ bill. Thus the bank can know the amount by checking which key is used to sign. Its important that a static value (static for all "bills") is used in the message, else the same coin can be ...


0

Why cannot the bank simply deduct Alice's account and add the funds to the Bob's account and delete the log of the transaction? If the bank creates just a piece of "blinded" information in exchange for debiting Alice's account, then it must keep track of that "coin". If it didn't, then Alice could just copy the piece of digital information and spend it over ...


3

Your exact case is that RSA is used as the key exchange mechanism. Instead, you should use DHE_RSA or ECDHE_RSA. Modern cryptography = TLS 1.2 or QUIC (protocol) + AES_128_GCM or CHACHA20_POLY1305 (cipher) + DHE_RSA or ECDHE_RSA or ECDHE_ECDSA (key exchange). Twitter discussion: https://twitter.com/reschly/status/534956038353477632 Commit: ...


0

Since the protocol version is good and AES_128-GCM is certainly not obsolete the remaining possibility is that something is wrong with the RSA key exchange. I'm not sure what google chrome understands as obsolete, but just the fact that key exchange is performed using RSA is not particularly good. Preferably RSA should only be used for authentication and the ...


2

That message probably indicates you're Using SSLv3, or Have a certificate signed with SHA-1 or MD5 According to this page. The former is a configuration issue, the latter require you to get a certificate signed with a SHA-256 hash.


0

1-time pad remains the strongest, uncrackable (if used properly) encryption. Of course, you DO have to swap pad face to face, but I reckon 95% of people who require this level of security WILL meet before setting up secure communications. Just specifying which 256-bit key to use for a particular message works perfectly and is used by the security services.


2

Every time you browse GMail or your bank's website using HTTPS from your laptop in a coffee shop or airport, your are broadcasting all sorts of ciphertexts to everyone who cares to listen in. It had better be safe publicly to share ciphertexts. Assuming a great many things about the strengths of the chosen ciphersuite, crypto implementations, and ...


2

Yes, sharing the ciphertext is safe. Kerckhoffs' principle, which modern cryptosystems are designed around, states that the system should be secure if everything about it is known except the specific key used for encryption/decryption. Additionally, security through obscurity is rarely effective. What you're (somewhat) getting at in your question is that of ...


4

OpenSSH is unaffected by FREAK for several reasons: It only uses a small, carefully-audited portion of the OpenSSL library. The SSL cipher-negotiation code is not one of the parts it uses. The SSH protocol is resistant to "downgrade" attacks: the size of the server key is fixed at the time of key generation and the key fingerprint is stored by the client. ...


13

Exposure of ciphertext does not inherently decrease is security of the algorithm. However, if the ciphertext is more easily accessible it is more likely to be found by an adversary. If your adversary has means to steal your private/shared keys, rubber hose you, etc its more risky to increase exposure. You may always want to consider that in the future a ...


43

That is exactly what encryption is designed to safely enable. If Bob and Alice could safely share the message without allowing attackers and eavesdroppers access to it, they would not, in fact, need encryption at all. So, yes, it is safe to allow any and everyone access to the ciphertext. You do want to authenticate it so that it cannot be tampered with ...


1

Timing attacks against string comparisons are not PHP-specific. They work in any context where a user-provided string is checked against a secret string using the standard “short circuit” comparison algorithm (the check stops on the first non-matching byte). This applies to PHP, Python, C and even database systems like MySQL. The standard approach to this ...


5

I will add a list with time constant functions for different languages: PHP: Discussion: https://wiki.php.net/rfc/timing_attack bool hash_equals ( string $known_string , string $user_string ) http://php.net/manual/de/function.hash-equals.php Java Discussion : http://codahale.com/a-lesson-in-timing-attacks/ public static boolean ...


3

The problem here is that generic string comparison functions return as soon as they find a difference between the strings. If the first byte is different, they return after just looking at one byte of the two strings. If the only difference is in the last byte, they process both entire strings before returning. This speeds things up in general, which is ...


3

The file in question does not exist (404). What the code does, is downloading the rep.jpg file as 83152553.exe. The code is equvalient with right-clicking on the link (http://.../rep.jpg), save as, save on harddrive, and then renaming rep.jpg to 83152553.exe , and then possibility executing the file. The reason its a JPG file is to circumvent upload ...


0

Maybe. The legacy algorithm uses iterated CRC32 to derive its initial state from the password. As the original paper describing the attack notes, the invertibility of the CRC32 hash function means that the password can be recovered with complexity 2((n-6)*8), so passwords of up to 16-18 characters should be reasonably recoverable. However, because the ...


2

You can't. It is impossible to verify that the output of a purported random generator is random enough for cryptography. (It is possible to verify that it's random enough for some applications such as Monte Carlo numerical methods, but not, say, to generate a cryptographic key.) There exist cryptographically secure pseudorandom number generators, that is, ...


3

Real "randomness" comes down to the amount of entropy in the samples. And entropy is more or less impossible to qualify in blackbox testing, as others pointed out. A good conditioning function and a simple input with very little information can pass statistical tests. So the tests can only point out that there is or isn't some inherent statistical weakness ...


-2

I certainly will not provide a code snippet how it should be done, but I can provide some tools to apply for a possible solution. I will use MCRYPT with BLOWFISH encryption in CBC mode, but you can certainly use MCRYPT_RIJNDAEL_128 (AES) or whatever you feel apropriate, I just didn't. How to create an IV? $iv=mcrypt_create_iv (mcrypt_get_block_size ...


11

NIST has defined in NIST Special Publication 800-22 an extensive set of statistical tests for verifying a source of randomness. However, while this is good enough to assert that a RNG is not obviously broken, it isn't sufficient to assert that a RNG is "good". It is the nature of RNGs that very subtle flaws can lead to breaking it. The only proper way of ...


-4

Use it to generate an image: random x, y, r,g,b... spot any pattern..? Update: While I agree that 1) this is not a very scientific method, and 2) it doesn't prove that the RNG is cryptographically secure, it is a quick and easy way to check if a RNG is not random... E.g. here's a visualisation of .net's System.Random:


2

You may be asking for steganography, where data is hidden in seemingly normal data/files. The hidden data can be encrypted or plaintext. There are many different applications of steganography, such as lists, text, images and file metadata. Keeping entropy in encrypted data means insecure encryption. Think of rot13 or similar substitution ciphers where one ...


0

It is possible to add a symmetric crypto algorithm to OpenSSL. There is an example algorithm called GOST included in modern OpenSSL distributions; this page talks a tiny bit about integrating it from a separate package, which would be a good first step for you if you want to learn how to integrate your own algorithm. That being said, while this would be a ...


4

What you are looking for is theoretically viable, provided that you add the missing extra piece, i.e. some form of time stamping. However, behaviour of existing, deployed implementations is likely to be a problem. The conceptual idea is that if you verify a signature at date T on some message, then, at a later date T', you can still remember that the ...



Top 50 recent answers are included