Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 3y ago · link · parent

> The website you are accessing knows nothing about your device,

That is not correct. WebAuthn supports attestation of a hardware key storage, which means site operators can refuse to accept your keys unless you use a device from a white list.

comment 3y ago · link · parent

Also, on Android instead of real TPM they often use a Trusted Execution Environment, which is basically a CPU mode.

comment 3y ago · link · parent

I think that you are wrong. The blog post [1] says:

> In some cases, for example, when the older device was lost or damaged, users may need to recover the end-to-end encryption keys from a secure online backup.

> To recover the end-to-end encryption key, the user must provide the lock screen PIN, password, or pattern of another existing device that had access to those keys.

This clearly states that you don't need original device to decrypt the keys: you only need a backup and a PIN code or unlock pattern which are easy to bruteforce.

[1] https://security.googleblog.com/2022/10/SecurityofPasskeysin...

comment 3y ago · link · parent

I cannot agree with this. First, as I understand, many Android phones do not have a TPM, they use "Trusted Execution Environment" instead. Second, Google can transfer private keys from device to Google cloud which means that if you can get root access to the phone, you can extract the keys using the same method.

comment 3y ago · link · parent

> With WebAuthn, nothing can be exposed.

With solution proposed by Google, the keys are stored on the phone. If an attacker gains access to the phone using one of numerous vulnerabilities in Linux kernel, they can bypass any biometric locks. And PINs are short, so they can be easily bruteforced.

The better solution is a physical hardware key that doesn't have tens of megabytes of ponentially vulnerable code and is not controlled by Google.

comment 3y ago · link · parent

The article doesn't specify how the backup is encrypted, but it says that in can be decrypted with a PIN or unlock pattern. These are weak keys and can be easily bruteforced by Google.

Also if you get banned from Google then you might lose access to your keys.

comment 3y ago · link · parent

Password authentication is an example of bad UI design (they are hard to remember and easy to forget), but passkeys are not great either. They have at least three weak points:

First, they are stored in a phone internal storage. This is not secure because phones have complicated software with large attack surface, and if an attacker finds a vulnerability, then they can gain access to all private keys on that device. If the phone is lost or stolen, then the keys can be recovered by reading phone's internal storage. Even if the keys are protected by a PIN, the PINs are usually short and can be easily bruteforced. If they are protected by a fingerprint or biometric lock then I assume that they are not encrypted at all.

Second, to synchronize keys between devices, private keys are uploaded to Google's cloud [1]. The post metions that they are end-to-end encrypted, by doesn't specify any details. However, it says that the keys can be decrypted on a new device if the user provides a PIN or unlock pattern:

> To recover the end-to-end encryption key, the user must provide the lock screen PIN, password, or pattern of another existing device that had access to those keys.

This means that keys stored in Google cloud are either not encrypted or use weak encryption keys that can be easily bruteforced by Google.

Third, synchronizing keys relies on Google's infrastructure. If you ever get banned from Google, you will lose the ability to synchronize keys, and maybe access to them as well.

So instead of promoting secure, easy to use, vendor-independent, cheap hardware keys, Google suggests that everyone stores their private keys either in a Google cloud or on devices where Google has root access. I don't think that it's a great idea.

[1] https://security.googleblog.com/2022/10/SecurityofPasskeysin...

Also, I don't like FIDO standard because it requires attestation of hardware keys and doesn't allow to use DIY keys for example.

comment 3y ago · link · parent

Please don't be fooled. If you look at the table in the article, you'll see that there are several categories of data that are not end-to-end encrypted, like Contants, and the reason for that is probably because US government and courts want to have them, even for non-US citizens. Otherwise why not encrypt them too?

It would be fair if Apple gave a warning about US governments and courts before enabling sync to iCloud, but I guess they don't want users to know about it.

Also this is a closed source system, so we can't know whether Apple can remotely extract encryption keys or not.

Also as I understand, Apple now demands a phone number to sign up for Apple ID, so it means that now all users and their contacts are non-anonymous for Apple.

comment 3y ago · link · parent

> i386 is not representative

Would it matter if it had better code density? "Modern" doesn't necessarily mean that it is better in every aspect. For example, there were articles claiming that same application compiled to 64 bits uses more memory than 32-bit version.

comment 3y ago · link · parent

Totally unfair in my opinion:

1) They have excluded i386. It is well known that 64-bit archs waste lot of memory and 32-bit arch could probably save something

2) They should have disabled position-independent code generation because on i386 it takes more memory

3) Instead of optimizing for speed whole program it is better to optimize for speed only "hot" parts and optimize the rest for size. Or optimize everything for size.

comment 3y ago · link · parent

9M is a lot. I wonder what do all those horses do?

comment 3y ago · link · parent

How is a user supposed to discover long power button press?

comment 3y ago · link · parent

There are other ways to launder money, for example casino, gift cards or betting on sports.

comment 3y ago · link · parent

Isn't main reason that when there are no limits people spend more money?

comment 3y ago · link · parent

30% seems a lot though. Credit card processors take somewhere around 2-3%.

comment 3y ago · link · parent

They are long to type and hard to read. They are so inconvenient to use that nobody uses them, even developers of Rust. Take source code of Vec as an example [1]. They use wrapping addition instead of checked one.

For comparison, in Swift normal arithmetic operations check for overflow.

[1] https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#1773

comment 3y ago · link · parent

Wrapping arithmetic operations have been a reason of vulnerabilities in Linux kernel though. Developers need real addition, not addition modulo 2^32.

comment 3y ago · link · parent

Rust doesn't check for overflow in arithmetic operations in release mode so there are lot of opportunities to create vulnerabilities in Rust.

comment 3y ago · link · parent

I remember reading that nix unlike all other distros can install multiple version of the same package and I want this feature, but I guess programming a package config might be too much for me. Maybe I'll try nix package manager then.

comment 3y ago · link · parent

> learn both the nix language

That seems weird to me. I don't have to learn package configuration language in other distributions. I thought that one could just install packages with a package manager.

> You can use nix-alien[2] which will automatically fetch the required libraries and build an FHS shell for the binary.

That's actually fine. I want to put closed source software into a chroot anyway.

comment 3y ago · link · parent

I might want to try some new Linux distribution so I wonder: what doesn't work in nix? What are its weaknesses? What about devices with non-free firmware?

comment 3y ago · link · parent

As I understand:

1) operating a large plant in US is much more expensive than in Taiwan and it will bring less profit. So it it not financially motivated decision.

2) US can restrict export of chips to other countries and TSMC will lose money in this case

3) US can copy the secrets, share them with Intel and AMD, and make chips without paying TSMC

So this looks like a risky and not profitable decision to me.

comment 3y ago · link · parent

As I understand, one plant is enough to copy all secrets of nanofabrication and build similar plants.

comment 3y ago · link · parent

Why did TSMC agreed to give away the most important technology to a foreign country? It doesn't look like a choice one would do voluntary.

In my opinion, they should better give away some outdated technology like 45 or 65nm.

This reminds me of China which forced some Western manufacturers to transfer technology to them.

comment 3y ago · link · parent

Don't you think that it would be better if certificate authorities were limited to certain TLDs? For example, a company from country A limited to A's national TLD? This way even if they are ordered to produce a fake certificate, they can only decrypt traffic for country A's sites.

Also browsers should display a warning when a certificate issuer for a website changes.

comment 3y ago · link · parent

This doesn't make much sense though. Why do we need a program's permission to delete file after it has been closed?

comment 3y ago · link · parent

No that's not what I meant. I meant delete at the moment file becomes unused.

comment 3y ago · link · parent

Wouldn't a perfect solution be to add a function "queue file deletion after it is closed" to Windows?

comment 3y ago · link · parent

Because the file was actually existing, but removed from directory list.

comment 3y ago · link · parent

Cannot one do inference using a CPU?
1
102103104
185