HNHacker News
TopNewBestAskShowJobs

eliteraspberrie

846 karma · joined September 25, 2013

www.eliteraspberries.com
submissionscomments
eliteraspberrie··on Teensy weensy crypto
If you have one of the three:

1. a one-way hash function; 2. a block cipher; or 3. a secure random number generator;

then you have the other two.

So replace "RC4" with Keccak and the argument stands. Keccak doesn't fit in a tweet but it prints onto a single page, which is easy enough to distribute: https://github.com/gvanas/KeccakCodePackage/blob/master/Stan...

eliteraspberrie··on Specific Problems with Other RNGs
Only cryptographers care about "unpredictability." Outside of cryptography, the interesting properties of a PRNG are speed, period length, and state size.

But a good CSPRNG has excellent statistical properties. So if you make "unpredictability" a requirement, their slow PRNG becomes very attractive. In other words, they made up a problem for their solution.

If you need a statistical PRNG, use a statistical PRNG. (The best are xorshift1024* and xorshift128+.) If you need a CSPRNG, use a CSPRNG.

eliteraspberrie··on The Government Uses Zero Days for “Offense”
I'm glad you brought this up. I know people who benefit from secure software today (they actually exist) and they are all customers. I don't know many users who can say the same.

For example, I've heard rumours about a formally-verified and usable replacement for PGP. Great... until the conversation turns to price:

PGP sucks!

Would you pay $10 for something better?

Heck no! PGP is free.

I think of security in terms of interests. Your interests, the developers' interests, and whether they align. I'm convinced the only scenario where our interests as users align with those of the developers is if we pay them directly. Not with ads, not with donations, not through foundations.

eliteraspberrie··on The Government Uses Zero Days for “Offense”
I doubt the NSA needs to instigate much. There is so much bad code in the world, and it just keeps growing, they would be in business forever just sitting on their thumbs.
eliteraspberrie··on My Livecoding.tv account deletion saga
A word of advice to founders from the US: ignoring user requests to delete accounts or personally identifying information is a crime in some countries. (I'm only familiar with French and Canadian law.)
eliteraspberrie··on Why NASA Needs a Programmer Fluent in Fortran and Assembly Language
I use Fortran code which was written before I was born on a daily basis. It works exactly as you expect.

I can't get C code to behave the same from one release of the compiler to the next.

Thank goodness NASA uses Fortran.

eliteraspberrie··on BoringSSL
libgcrypt (GPG) does the same thing OpenSSL did. It uses /dev/random to seed an internal PRNG. But you can switch to using just the system PRNG:

    gcry_control(GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM);
I don't know if they would be convinced to use /dev/urandom though. They already rank /dev/random as having lower "security" than their own PRNG.
eliteraspberrie··on Processing the Viking Lander camera data [pdf]
You can reproduce some of the image processing described here with software today.

For example, in Figure 3, the histogram at the top right is a "periodogram" of the original image data. It shows that the original image is skewed towards the high end of the frequency spectrum. They apply a high-pass filter (discard the lowest frequencies) so the processed image shows higher details than the original.

If you had the original photograph as an image file, let's say an image of the surface of Mars, [0] you could filter out the lowest ten frequency components with a Python script: [1]

    pip install avena
    avena filter high 10 pia19676-fig1_ml_mcam04403coloradjusted24bwscale.jpg
The result: http://imgur.com/a/ASusx

Notice the details are more visible.

[0] http://www.nasa.gov/jpl/msl/pia19676/geological-contact-zone...

[1] (shameless plug) https://github.com/eliteraspberries/avena

eliteraspberrie··on Stupid Apps and Changing the World
To single one out, the Full Belly Project is a great example. Their Universal Nut Sheller has had a real, measurable impact on economies.

In general terms, several industries have had a real, measurable impact on economies. The scooter, the diesel truck, the steel hulled boat, the washing machine, the cell phone... There are many successful companies in these industries that have a real impact on humanity and make a profit too.

I find it astonishing that you couldn't think of examples of businesses that have had a bigger impact on humanity than Twitter and Facebook.

eliteraspberrie··on Chebyshev Approximation
The reference collection of polynomial approximations is: Approximations for digital computers by Cecil Hastings Jr. The method to derive the polynomials is described there as well as coefficients for many common functions. It isn't as complicated as it seems. Intel has probably automated the procedure.
eliteraspberrie··on Why salad is so overrated
Don't eat salad for the lettuce, it's just water and fiber. Eat salad for the dressing. Traditionally, dressing is about 3/4 oil (olive oil) and 1/4 acid (vinegar), which is nutritious.
eliteraspberrie··on Meeting Snowden in Princeton
I have immense respect for the author, and I know these are just notes, but the tone of technologists who talk about Snowden is very annoying.

We know certain technologies like Tor and OTR are safe because of the weight of scientific research that support them, and the immense effort of the developers. Not because someone said so at an event. Statements like "gpg ciphertexts with RSA 1024 were returned as fails" are totally meaningless.

I wish people had more confidence in good old science (like Anderson's works) than glamorous events like this. You should all check out Security Engineering by the same author, it's free! www.cl.cam.ac.uk/~rja14/book.html

eliteraspberrie··on Ask HN: Open-source license for self-documenting code?
The BSD licenses mention code and documentation together ("this software and associated documentation files") so I assume any of those would provide you the same protection for your entire work. I don't know much about the GPL.

You could always make the source (of both code and documentation) public but non-free, and make the generated code and documentation available separately with their own liberal licenses.

By the way, did you use literate programming? I'm always curious about large programs made in that style, it's very rare.

eliteraspberrie··on Rust once, run everywhere
Bindings can leverage the ownership and borrowing principles in Rust to codify comments typically found in a C header about how its API should be used.

Could the Rust compiler make use of design by contract style annotations in the C header? Maybe it could reason that an unsafe block is in some ways safe.

There is a specification language for C called ACSL (which was designed for and is mainly used by Frama-C). Annotations look like:

    /*@
        ensures \result >= 0;
        assigns \nothing;
     */
    int foo(int x)
    {
        if (x < 0)
            return 0;
        return x;
    }
I noticed there are annotations for Rust with the LibHoare library (https://github.com/nrc/libhoare). The example above might look like:

    #[postcond="result >= 0"]
    fn foo(x: int) -> int {
        if x < 0 {
            0
        } else {
            x
        }
    }
It would be really cool if ACSL could be translated to LibHoare.
eliteraspberrie··on GPG and Me
There are a couple alternatives to GPG being developed right now.

One is reop (https://github.com/tedu/reop). The cryptography is done by libsodium and it is well-written.

Another is NetPGP (http://www.netpgp.com/). The cryptography is done by the OpenPGP SDK. The NetPGP code is well-written but the OpenPGP SDK code looks like OpenSSL.

Both are promising and deserve everyone's support.

eliteraspberrie··on Follow-You Printing
This worked back in the day, when printers had no network-level access control, maybe not anymore... Go through the printer's settings, and select the one that prints out all the current settings; on it may be the printer's IP address; also note the make and model; get the Linux driver (PPD) from the manufacturer, either on their website or by requesting the CD in the mail; install the driver on your local machine with CUPS and print directly.

If you're djb you might even get away with it.

eliteraspberrie··on $300k for Cracking Telegram Encryption
If no one wins the contest, it proves nothing.

But contests like this are a bad idea for another reason: people will hoard bugs instead of disclose, sometimes for years. For example, the Pwn2Own contest boosted the discovery and disclosure of bugs in browsers for the first few years, but now companies have co-opted it into a marketing event. They sit on exploits in order to win two or three years from now.

I noticed a bug in one of the Telegram clients when the first contest was announced, but it wouldn't have qualified. Now the reward has tripled, and the scope expanded. As the user base grows, the reward will go up again (and again), and I'm sure no one will claim the bug since real experts have better things to do, so maybe it's smart to wait, maybe not...

Telegram, and other projects thinking of doing this: think small. In the lottery model, there is one big winner; you should prefer a model with many (smaller) winners. Pay for patches that improve the quality of the code base, fix compiler warnings, improve documentation, etc. Many grains of sand will sink a ship.

eliteraspberrie··on EFF Relaunches Surveillance Self-Defense Guide
I wish they would recommend alternatives to Pidgin or Adium. (Because they are graphical interfaces to libpurple, which wasn't written with security in mind, to put it nicely.) Gajim and Jitsi are both free software IM clients, cross-platform, implement OTR, and are written in high-level languages. Please contribute time to both these projects, if you can.
eliteraspberrie··on Making sure crypto remains insecure [pdf]
As well as being the author of the algorithms in NaCl, djb is also a specialist in secure software development, as tptacek mentioned.

You can be reasonably sure that his code is bug free, but they went the extra step of proving the absence of certain types of bugs using static analysis tools. One of the project's deliverables mentioned they used Frama-C to prove the absence of integer overflows, for example. (I will update this comment when I find the specific report.)

Other projects take the traditional approach of trusting that the code looks right until someone proves otherwise.

Edit: The report was probably one of these, which I can't access anymore:

http://www.cace-project.eu/downloads/deliverables-y1/CACE_D5... http://www.cace-project.eu/downloads/deliverables-y1/CACE_M5... http://www.cace-project.eu/downloads/deliverables-y3/31_CACE...

eliteraspberrie··on Complex Step Differentiation
This general case of this method is sometimes called Lagrangian interpolation. As the article describes, there is one caveat with using these formulas: you can only decrease the step size so much before it backfires.

Because you are dividing by h, to decrease it from, say 1e-6, to 1e-8 introduces more error into the result than it removes. (Floating-point division with a numerator and denominator that have a big difference in magnitude is a problem.)

The example problem in the article just happened to be well conditioned because the sine and cosine, and their derivatives, are bound on [-1, 1], but most problems won't be and the complex step method won't help much then either.

To get better accuracy, rather than decrease the step size, you should use a higher-order formula. The three and five-point formulas are common. The Handbook of Mathematical Functions (Abramowitz & Stegun) has a table of coefficients for differentiation formulas up to the sixth order (Table 25.2): http://imgur.com/eRl8w8h

For fun, derive the 8-point formulas.

eliteraspberrie··on China Said to Exclude Apple From Procurement List
In China, strategic industries like energy, steel, and telecommunications are state controlled. Huawei, for example, is a "national champion," which means it receives subsidies, foreign employees cannot own shares, the Party appoints an anonymous board to manage the company's management, and so on.
eliteraspberrie··on Free, Worldwide, Encrypted Phone Calls for iPhone
There is no such thing as low latency anonymity.
eliteraspberrie··on Free, Worldwide, Encrypted Phone Calls for iPhone
It would be nice if the server software were open source as well.

Call routing information, like all metadata, can only be protected legally not cryptographically. So it's not something I trust to people outside Canada, no matter how much esteem I have for them.

eliteraspberrie··on A Convicted Hacker and an Internet Icon Join Forces to Thwart NSA Spying
Watt wasn't convicted for fraud, he was convicted for not snitching. I, for one, trust the man's integrity, and I'll judge his code when I see it.
eliteraspberrie··on MiniLock – File encryption software that does more with less
My mistake, zxcvbn uses that formula only for repetitions.
eliteraspberrie··on MiniLock – File encryption software that does more with less
I am not a cryptographer, but I'll offer some advice, if I may: don't let people choose a passphrase, generate one for them. People are very bad at creating good passphrases, but decent at memorizing a good one.

I say that because I don't trust the zxcvbn library. It underestimates the entropy of "aaaaa" as 7 bits [log(26 * 5)], not the correct value of 23 bits [log(26) * 5], for example. In this instance, it's to your advantage, but it doesn't inspire confidence in its other calculations.

eliteraspberrie··on Tech Blogger Tries To Cancel Comcast Service, Hilarity Ensues
This is common in Canada too. I've learned to cancel services in writing, by fax and registered mail. You save yourself a big headache.
eliteraspberrie··on Named parameters in C
This (compound literals) also has the advantage of being strictly valid C, since compound statements are a GNU extension.
eliteraspberrie··on Tor Project Sued
Including the Tor project in this lawsuit is obviously out of ignorance, and won't succeed.

Having said that, personally, I would just attack the hidden service directly. It's not particularly difficult to censor a node by DoS. More sophisticated attacks include setting up your own hidden service directory server and just return 404 for requests to PinkMeth. Researchers have shown it's possible and doesn't require much resources: Trawling for Tor Hidden Services: Detection, Measurement, Deanonymization. http://www.ieee-security.org/TC/SP2013/papers/4977a080.pdf

eliteraspberrie··on German government cancels Verizon contract in wake of U.S. spying row
It seems so obvious that government communication networks should be built and run by a domestic company. Isn't that the standard in most developed countries?
← PreviousPage 2 of 9Next →