Reputation
26,424
Next tag badge:
100/100 score
17/20 answers
Badges
5 56 120
Impact
~1.9m people reached

Jul
5
answered Javascript Diffie-Hellman and AES protocols
Jul
5
comment Javascript Diffie-Hellman and AES protocols
Though +1 for the other advice. DH can be man-in-the-middled fairly easily (Eve intercepts communication between Alice and Bob and does DH key exchange with both decrypting and re-encrypting every message with neither being the wiser). So you do have to be very careful in how you apply your cryptography. Granted, SJCL is good open-source code library written by Dan Boneh (a cryptographic expert) and his students. So the implementation of AES, RSA, probably are much better than ones you would implement yourself. (Though you need 16 bytes of a hash to get a 128 bit AES key).
Jul
5
comment Javascript Diffie-Hellman and AES protocols
I agree that JS crypto loaded over HTTP should not be used as a replacement for TLS to be used for encryption during transport from client to server for say credit card transactions or sending passwords. However, encryption in JS can still be quite useful. E.g., one could write a JS browser extension (downloaded from a trusted source using TLS), and you encrypt your text client-side, then paste the encrypted text into gmail and send it to a recipient who has a browser plugin at their end that decrypts it; preventing any eavesdroppers who may have access to google's servers.
Jul
3
revised Becoming HIPAA Compliant
Acronym fix. HIPAA (Health Insurance Portability and Accountability Act) not HIPPA
Jul
3
reviewed Approve How can I punish a hacker?
Jul
3
reviewed Approve How do DoS/DDoS work?
Jul
2
comment Specific risks of embedding an HTTPS iframe in an HTTP page
The first three reasons seem to be more than enough. I would actively recommend for people not to shop at that site. Users have been repeatedly trained to check for https in the URL bar to a known domain. While I could attempt to check there's no rogue keylogging JS and HTTPS is actually being used (every time - and the no keylogging check is not trivial with minified JS), I wouldn't expect most users to be able to do this. Also, how do I know that the HTTPS connection for ninjastandingdesk.com is supposed to be to newrelic.com and that isn't a MitM attack?
Jul
1
comment If hashing is one way, why can we decrypt MD5 hashes?
@ewanm89 - I take you couldn't find a collision with your MD5 rainbow tables. A rainbow table is just a time-memory tradeoff, every hash still has to be computed (plus apply a reduction function). Imagine a powerful adversary built a rainbow table with 280 MD5s. (If one MD5 takes 1 cpu-nanosecond this would require 38 billion CPU years, 10 billion computers for ~4 years, to construct). With this and a 128-bit MD5 of a high-entropy passphrase, the chance of one of my MD5s being broken is ~1 in 248 (281,474,976,710,656). Granted a stronger unpublished preimage attack on MD5 could exist.
Jul
1
comment Why aren't sophisticated Malware written with .NET
For example, say you are testing for SQL injection and need to make repeated HTTP post requests. Which is easier; python with a two-liner import requests, resp = requests.post('http://example.com', {'username': "Robert'); DROP TABLE Students; --", 'password':''} or the Java/C# equivalent: stackoverflow.com/a/3325065/457571 / stackoverflow.com/a/4015346/457571 (I had this as answer that got cut off when closed).
Jul
1
comment Why aren't sophisticated Malware written with .NET
Well, a lot of the security-conscious community does not develop on a windows platform and C#/.NET is a poor fit for those users (yes there's Mono, but its not the same). Secondly, a lot of malware needs to either be written at a very low-level (specifically shell code, or brute-forcing hashes/keys using GPUs) like C or assembly. Other tasks can be written at a much higher level where dynamically-typed interpreter-friendly "scripting" languages (e.g., ruby/python) are generally preferred over more verbose "enterprise-friendly" languages like C# or Java.
Jun
29
comment If hashing is one way, why can we decrypt MD5 hashes?
@ewanm89 - Want to bet? I'm willing to bet a $200 donation to any legitimate charity of loser's choice (say Cancer Research Institute - cancerresearch.org) if you can prove me wrong in the next month (I'd agree for longer terms if you need it, but risk forgetting about the wager). Full disclosure, I only vaguely remember the original string. So if you can generate an input (not necessarily my string) md5sums to that hash or this one 0113fd21d9ec4e367abb761b26ef6010 (also 42 ascii chars but I saved this string to disk). Or if you want we could do a straight-up bet via bitcoin.
Jun
28
comment If hashing is one way, why can we decrypt MD5 hashes?
Since you posit MD5 is "decryptable", please recover the original data for this hash: 0cca9b3eeae7b8747eaf61f8d282156d. I'll even give you a hint, it's a real md5 of 42 character ASCII string. PS, using the best public attacks on MD5 this should only take work 2**123 ~ 10,633,823,966,279,326,983,230,456,482,242,756,608 or at a billion hashes per second on a billion computers, it should only take about 170 billion years on average.
Jun
28
comment Why does AES encryption take more time than decryption?
@CodesInChaos - While I can't demonstrate that all symmetric key ciphers take same time on one block for enc/decrypting. However, looking at threefish's implementation (section 2.2 ), it should take the same time to encrypt/decrypt. Tests in python3 for threefish show the same running time; e.g., encrypting 50000 random 64-byte blocks takes 23.134 +/- 0.183 ms, while decrypting 50000 random 64-byte ASCII blocks takes 23.135 +/- 0.095 ms. Here's a pastebin of the python3 tests.
Jun
27
comment What anti-keylogging programs can you use when using a public PCs
@JasonSmith - hardware keyloggers can be obtained very cheaply. HTTPS can be MitM if you install fake trusted root certificates in the OS/browser. Granted, two-factor authentication and your own read-only media (ideally a CD/DVD/USB stick with a read-only lock set) would be secure. But really your best bet is to avoid public PCs.
Jun
27
comment What anti-keylogging programs can you use when using a public PCs
+1, though if you have two-factor authentication set up (e.g., text messaged one-time code to cell phone), manually logging out, and later changing your password its quite probably reasonably safe.
Jun
26
awarded  Good Answer
Jun
26
revised Why does AES encryption take more time than decryption?
added 13 characters in body
Jun
26
awarded  Mortarboard
Jun
26
awarded  Nice Answer
Jun
26
revised Why does AES encryption take more time than decryption?
added 45 characters in body