HNHacker News
TopNewBestAskShowJobs

mratsim

1,410 karma · joined October 15, 2017

Ethereum, Nim and open-source dev during the day, data scientist, Kaggler and deep learning framework author at night.

Check out my Numpy/PyTorch alternative written in Nim: ergonomics of Python, speed of C, OpenMP, Cuda and OpenCL support - https://github.com/mratsim/Arraymancer

submissionscomments
mratsim··on How SSH port became 22 (2017)
I am reading the replies.

You don't understand the legal liabilities people open themselves to if they provide the software.

Now they have to fully KYC customers to make sure they are from the US, with US only storage, and firewall so that people travelling cannot use the encryption library from out of the US.

You've seen the lawsuits on just P2P link providers, this is even worse.

mratsim··on How SSH port became 22 (2017)
How would US vendors prevent people from outside the US to acquire the software?
mratsim··on How SSH port became 22 (2017)
I understand where you're getting at, but lawyers would see "is it possible for people out of the US to download this? Yes? Well lawsuit incoming, by the government/military."

This is way too much of an unknown. And we've seen with P2P/Napster and DMCA where just listing links without distributing still opens people to legal issues.

mratsim··on How SSH port became 22 (2017)
How would you send encrypted email without an encryption library?
mratsim··on How SSH port became 22 (2017)
How would you send encrypted emails without an encryption library?
mratsim··on How SSH port became 22 (2017)
Cryptography was considered a war weapon and only allowed for military use.

The United States had to be brought to court to finally allow cryptography: https://en.m.wikipedia.org/wiki/Bernstein_v._United_States

> Years before, the government had placed encryption, a method for scrambling messages so they can only be understood by their intended recipients, on the United States Munitions List, alongside bombs and flamethrowers, as a weapon to be regulated for national security purposes. Companies and individuals exporting items on the munitions list, including software with encryption capabilities, had to obtain prior State Department approval. — Electronic Frontier Foundation: EFF's History

Before that, export rules could be "worked around" by printing cryptography in books.

See also https://en.m.wikipedia.org/wiki/Export_of_cryptography_from_...

mratsim··on Power of small optimizations
Premature slogans are the root of all evil.
mratsim··on A mistakenly published password exposed Mercedes-Benz source code
The people who found the bug in glibc worked at an audit firm.

Peers aren't enough. Finding vulnerabilities require training and an adversarial mindset that is rare.

There is a reason why in cryptography people say "don't roll your own crypto"

mratsim··on A mistakenly published password exposed Mercedes-Benz source code
Your argument is that asking for professional auditor is not necessary for open-source code.

My argument is that open-source is not enough when high-assurance is needed and devs or end-user should still ask for a professional audits.

mratsim··on A mistakenly published password exposed Mercedes-Benz source code
It's a project used by millions of people yet it took 2 years.

What about projects used by 10~50 people?

mratsim··on A mistakenly published password exposed Mercedes-Benz source code
And here 2 years to find a buffer overflow vulnerabity in glibc that was found via a fuzzer: https://news.ycombinator.com/item?id=39194093

In a library used on billions of devices.

mratsim··on A mistakenly published password exposed Mercedes-Benz source code
There isn't
mratsim··on A mistakenly published password exposed Mercedes-Benz source code
Do they have background in fuzzing or formal verification? That's what you need if you want to make high-assurance software.
mratsim··on A mistakenly published password exposed Mercedes-Benz source code
What do you mean?
mratsim··on A mistakenly published password exposed Mercedes-Benz source code
Auditing your own code doesn't help if you have a blindspot. You will miss it while developing and auditing.

> Everyone who is able will want to take a look.

This is not true. Auditing is very skill intensive and time intensive. There needs to be compensation for it either direct (you pay for professional auditors) or indirect (you're an academic and you get reputation and grants for breaking WPA3, SGX, Mega or SIKE, or fame for breaking the PS3).

You can easily get in a situation with "The Emperor has no clothes" where everyone thought open-source code must have been audited by someone because it's open, when in fact no one did because they didn't care or had no incentives.

mratsim··on A mistakenly published password exposed Mercedes-Benz source code
It should be audited by professionals, but available for public reviews / additional audits.

General folks and even most devs do not have the skills to audit code.

mratsim··on Building a Password Cracker in 2024
Not sure what's your use-case and threat model, but HKDF is likely what you want, the concatenation is done in a way to prevent attacks: https://www.rfc-editor.org/rfc/rfc5869
mratsim··on From slow to SIMD: A Go optimization story
The compiler escape hatch is -ffast-math
mratsim··on BLIS: A BLAS-like framework for basic linear algebra routines
The batch match-mul API would be very useful for convolutions. It's also used on Nvidia GPUs.

Often you get tensors that are sliced views on one or more dimensions, with BLAS-api you need to allocate them in a contiguous buffer. BLIS does not need that, there is a repacking algorithm to overcome memory bandwidth bounds in matrix multiplication (search the "roofline model"), the slicing/realloc can be fused with repacking with BLIS API.

mratsim··on BLIS: A BLAS-like framework for basic linear algebra routines
MKL is very fast, on Intel. Due to how they do CPU detection.

It is a specialized library and they JIT their kernel.

Usually BLIS is slower.

mratsim··on BLIS: A BLAS-like framework for basic linear algebra routines
MKL has a JIT similar to libxsmm for small sizes.
mratsim··on From slow to SIMD: A Go optimization story
That's what I'm saying though. Either youbdo the accumulators yourself, or you need a compiler escape hatch.
mratsim··on From slow to SIMD: A Go optimization story
They do reorder instructions. I think the SIMD part has more to do with loop analysis than ILP.

It's quite telling that there is a #pragma omp simd to hint to a compiler to rewrite the loop.

Now I wonder what's the state of polyhedral compilers. It's been many years. And given the AI, LLMs hype they could really shine.

mratsim··on From slow to SIMD: A Go optimization story
It depends.

You need 2~3 accumulators to saturate instruction-level parallelism with a parallel sum reduction. But the compiler won't do it because it only creates those when the operation is associative, i.e. (a+b)+c = a+(b+c), which is true for integers but not for floats.

There is an escape hatch in -ffast-math.

I have extensive benches on this here: https://github.com/mratsim/laser/blob/master/benchmarks%2Ffp...

mratsim··on NASA unlocks $1B canister of asteroid dust
Dow Jones Index?
mratsim··on Identifying Rust's collect:<Vec<_>>() memory leak footgun
A memory leak means it leaks, it's not anymore under control. Here the memory is under control, it can be reclaimed by the program.
mratsim··on RSA is deceptively simple and fun
GMP is not a cryptographic library and using it prevents you from being constant-time, you'll also be very slow. That's for the math.

Then you'll have non-erased secrets in memory.

Now for RSA specifically, you'll likely have one or more issues linked to: - padding oracles - falling to fake primes due to using non-hardened Miller-Rabin vs Baillie - Confusion on the various PKCS specs - Bleichenbeicher attacks - anything in the Wycheproof repo or cryptofuzz

mratsim··on EU NGI TALER will bring private and secure online payments to the Eurozone
Can you substantiate what makes this a cryptocurrency?

Everytime you authenticate on your bank website you sign a payload, that doesn't make transactions there cryptocurrency.

mratsim··on Inside the Steam Deck's APU
The stuff on the PRO is a Xilinx FPGA, or they have both an ARM Processor and an FPGA?
mratsim··on Skiff: Various Privacy Failures
Disagree, their reputation is tied to their audit quality.

But I'm pretty sure in this case the scope was bad. Like they coukd have had audits on "Do I use OpenSSL well?" and then misrepresent that all their privacy claims were audited.

Now it seems like Skiff conveniently didn't allow Trail of Bits to publish their reports, they are usually here: https://github.com/trailofbits/publications/tree/master/revi...

Disclaimer, I have used Trail of Bits service in the past (and 2 other auditors for an security campaign on a blockchain, cryptography + networking product).

← PreviousPage 2 of 20Next →