60,914 reputation
575155
bio website
location
age 68
visits member for 2 years, 6 months
seen 12 hours ago

I SHALL DEVOUR YOUR HEART AND FEAST ON YOUR SOUL (so don't bug me).


1d
comment Encrypting/decrypting information in database
Yes, in case of password loss, the data is lost. One method is to use escrow: the data, or the encryption key for the data, is also encrypted with a public key. The sysadmin keeps the private key somewhere else (not on the server itself) and uses it to salvage the data of people who forgot their password. Of course this means that the sysadmin can decrypt users' data, which may or may not be appropriate to your case. Alternative: the user writes his encryption key on a paper and keeps that in a safe, to be used in case of emergency.
2d
comment How can I create a password that says “SALT ME!” when hashed?
Brutally... I took an MD5 implementation from here, then went through many 8-letter passwords until the proper output was obtained. About 2^23 tries per second and per core on my 3.1 GHz server (I estimate that I could do 2^24 with some SSE2-aware code -- I had done that at one time for SHA-1).
2d
comment How can I create a password that says “SALT ME!” when hashed?
UsePBKDF2 and UseBcrypt are 9 letters each, for an average cost of 2^54, which is quite beyond what I can do with my lone quad-core server. With these nifty GPU arrays which claim to do 8 billions MD5 per second, this could be done within a month (more or less).
2d
comment How can I create a password that says “SALT ME!” when hashed?
NoMD5 is only five letters; we can go to six and get NoMD5+, which looks better. And, indeed, pmcrsihh yields NoMD5+pyhpe6Xxa3x93iGQ==.
Apr
21
comment What are the OpenSSL standard Diffie Hellmann parameters (primes)?
The warning in the documentation is only theoretical. When you try to break discrete logarithm modulo a prime p, the first attempt is very expensive, but subsequent breaks modulo the same prime are much cheaper (you can reuse big parts of the inner attack results). This is the "specialization" they are talking about. However, a 1024-bit modulus appears to be quite beyond the technologically feasible (current record is 530 bits) so even that "first attempt" is out of reach.
Apr
17
comment Does TCP/IP protocol offer a reliable way of determining who the actual sender was?
When you use a proxy, you are not using a fake IP address -- you are using the real IP address of the machine which does the proxying work for you. Here, we are talking about an attacker who could take the control of an infrastructure router and can see IP packets destined for a whole network (not the one where the attacker has his own machine). This is more power than is available to the bulk of amateur attackers.
Apr
17
comment How many Stack Exchange logins should I have?
The logic is simple: if you want to minimize the risks of hostile hijack, have only one login. If you want to minimize the risks of being locked out, have at many as possible. This is a trade-off, and only you can make that decision. (However, one possible "login" option is through stackexchange themselves, which is unlikely to close independently of the site itself, so maybe "just one, the one provided by stackexchange" would be the optimal spot.)
Apr
15
comment One computer with multiple OSs in different drives
Actually flashing the BIOS does not require a reboot; it just is that the BIOS reflashing utilities prefer it when there is no running OS at that time (to avoid untimely accesses), and the post-flash reboot is to make sure that the new BIOS code is used. However, the hardware itself has no notion of a "reboot" and warm-flashing is possible -- not recommended, but virus writers don't like to play safe anyway (especially with your hardware).
Apr
15
comment One computer with multiple OSs in different drives
A virus which infects hardware (e.g. the motherboard) must do things which are specific to that hardware. That does not mean that it does not happen... only that it will entail more work for the virus writer.
Apr
15
comment Why are security-crucial software written in unsafe languages?
Big integers are not easy to use in the absence of automatic memory management (the GC). Many people also fear that making the default "int" type a big integer would incur intolerable overhead (which is mostly untrue in practice, if you do it properly, i.e. encoding small integers as sort-of pointers). Python, and some Scheme dialects, use big integers by default.
Apr
15
comment Why are security-crucial software written in unsafe languages?
In my case, the JVM (that I wrote my self) was of the AOT kind: translation of bytecode (not Java source) to C code, compilation with a C compiler. Compared to native code for computing intensive tasks (e.g. encryption), the slowdown is a factor of 2 to 4. For big integers too -- at least on 32-bit ARM and PowerPC; on 64-bit x86, the factor rises to about 6 due to the 64x64->128 multiplication opcode that cannot be used from Java (whose biggest integer type is 64 bits).
Apr
15
comment Why are security-crucial software written in unsafe languages?
The hardware was a HSM, it had a cryptographic accelerator for RSA. "Native math" would not have been sufficient, by far. Note that the symmetric cryptography of the SSL connections was pure Java.
Apr
14
comment Are there “secure” languages?
But you had that kind of box about the "standard C library"... which is formally part of the language. Similarly, you never had a popup about the Java compiler being insecure, only the runtime support code.
Apr
14
comment Can Heartbleed be used to obtain memory from other processes?
No, indeed, the quote about mmap() does not imply reading memory from another process. What it implies is that blocks allocated from areas obtained through mmap() will be located in somewhat random places in the address space, whereas blocks from sbrk() have a more deterministic emplacement.
Apr
11
comment Why don't more websites implement Perfect Forward Secrecy?
BEAST has been mitigated client-side in many ways, but some widely used "test your server" sites will award a "A+" mark only if your server enforces RC4 whenever possible. If you want to conclude that such test sites simply make problems worse... well, you would be right.
Apr
11
comment What part of the browser is typically attacked?
The human user is the part which is most often compromised.
Apr
11
comment Firefox can import the .p12 format, but that contains a private key? Isnt this a security risk?
I have seen one bank distributing certificates to its clients, but that's still pretty rare. For a long time, certificate handling by browsers used very ugly popups, which did not help in making client certificates popular.
Apr
11
comment Firefox can import the .p12 format, but that contains a private key? Isnt this a security risk?
If you have a private key you can sign what you want, but if you want to play the role of a CA and issue certificates which are accepted by other people, then these other people must trust your public key in a CA role, which usually means that your public key is in a certificate, signed by another CA (that they trust), and, crucially, that certificate has the "is CA" mark in it (in the Basic Constraints extension, see the RFC). Existing commercial CA won't sell you such a certificate (or only for a wheelbarrow of money bills).
Apr
9
comment Should I change all my passwords due to heartbleed
It is no more (and no less !) necessary to change all passwords due to this bug, than it was for all the previous bugs which occurred over the years and allowed just as well data to leak or, even worse, complete hostile control. And we did not previously. So either everybody got it wrong for the last 30 years and we really should have reset all passwords for all servers in the world several times per year; or else somebody might be exaggerating a bit the specific case of this particular bug.
Apr
9
comment Heartbleed - Blown out of proportion?
Well, not really: you get a buffer overrun, so the server will read whatever bytes are there. But this can fall in an unallocated page, triggering a page fault and thus a crash of the server process. Thus, it is not 100% reliable, and neither is it 100% stealthy.