juan_gandhi: (Default)
[personal profile] juan_gandhi


Ничего себе; так на него и продолжают охотиться.

fucking claude.ai

Jun. 6th, 2025 06:16 pm
juan_gandhi: (Default)
[personal profile] juan_gandhi

So, I was trying to play with claude-code. It was supposed to be using my claude.ai account. I went there, chose "pro", which will be able to access my github. Ok, and I paid for one month. Opened claude-code again, and it needs a different kind of account in claude... or in anthropic... So I asked claude, how can I connect to my installation of claude-code. It does not know. It says "ask claude-code". Multiple personalities, I guess. Or a large company (same thing). Now I'm trying to cancel my subscription. But they are all just bots there.

So I had to call my bank, to dispute the charge.

Do I like it? First of all, I really don't trust these bots (yet).

What do you think?
[personal profile] mjg59
As I wrote in my last post, Twitter's new encrypted DM infrastructure is pretty awful. But the amount of work required to make it somewhat better isn't large.

When Juicebox is used with HSMs, it supports encrypting the communication between the client and the backend. This is handled by generating a unique keypair for each HSM. The public key is provided to the client, while the private key remains within the HSM. Even if you can see the traffic sent to the HSM, it's encrypted using the Noise protocol and so the user's encrypted secret data can't be retrieved.

But this is only useful if you know that the public key corresponds to a private key in the HSM! Right now there's no way to know this, but there's worse - the client doesn't have the public key built into it, it's supplied as a response to an API request made to Twitter's servers. Even if the current keys are associated with the HSMs, Twitter could swap them out with ones that aren't, terminate the encrypted connection at their endpoint, and then fake your query to the HSM and get the encrypted data that way. Worse, this could be done for specific targeted users, without any indication to the user that this has happened, making it almost impossible to detect in general.

This is at least partially fixable. Twitter could prove to a third party that their Juicebox keys were generated in an HSM, and the key material could be moved into clients. This makes attacking individual users more difficult (the backdoor code would need to be shipped in the public client), but can't easily help with the website version[1] even if a framework exists to analyse the clients and verify that the correct public keys are in use.

It's still worse than Signal. Use Signal.

[1] Since they could still just serve backdoored Javascript to specific users. This is, unfortunately, kind of an inherent problem when it comes to web-based clients - we don't have good frameworks to detect whether the site itself is malicious.
[personal profile] mjg59
(Edit: Twitter could improve this significantly with very few changes - I wrote about that here. It's unclear why they'd launch without doing that, since it entirely defeats the point of using HSMs)

When Twitter[1] launched encrypted DMs a couple
of years ago, it was the worst kind of end-to-end
encrypted - technically e2ee, but in a way that made it relatively easy for Twitter to inject new encryption keys and get everyone's messages anyway. It was also lacking a whole bunch of features such as "sending pictures", so the entire thing was largely a waste of time. But a couple of days ago, Elon announced the arrival of "XChat", a new encrypted message platform built on Rust with (Bitcoin style) encryption, whole new architecture. Maybe this time they've got it right?

tl;dr - no. Use Signal. Twitter can probably obtain your private keys, and admit that they can MITM you and have full access to your metadata.

The new approach is pretty similar to the old one in that it's based on pretty straightforward and well tested cryptographic primitives, but merely using good cryptography doesn't mean you end up with a good solution. This time they've pivoted away from using the underlying cryptographic primitives directly and into higher level abstractions, which is probably a good thing. They're using Libsodium's boxes for message encryption, which is, well, fine? It doesn't offer forward secrecy (if someone's private key is leaked then all existing messages can be decrypted) so it's a long way from the state of the art for a messaging client (Signal's had forward secrecy for over a decade!), but it's not inherently broken or anything. It is, however, written in C, not Rust[2].

That's about the extent of the good news. Twitter's old implementation involved clients generating keypairs and pushing the public key to Twitter. Each client (a physical device or a browser instance) had its own private key, and messages were simply encrypted to every public key associated with an account. This meant that new devices couldn't decrypt old messages, and also meant there was a maximum number of supported devices and terrible scaling issues and it was pretty bad. The new approach generates a keypair and then stores the private key using the Juicebox protocol. Other devices can then retrieve the private key.

Doesn't this mean Twitter has the private key? Well, no. There's a PIN involved, and the PIN is used to generate an encryption key. The stored copy of the private key is encrypted with that key, so if you don't know the PIN you can't decrypt the key. So we brute force the PIN, right? Juicebox actually protects against that - before the backend will hand over the encrypted key, you have to prove knowledge of the PIN to it (this is done in a clever way that doesn't directly reveal the PIN to the backend). If you ask for the key too many times while providing the wrong PIN, access is locked down.

But this is true only if the Juicebox backend is trustworthy. If the backend is controlled by someone untrustworthy[3] then they're going to be able to obtain the encrypted key material (even if it's in an HSM, they can simply watch what comes out of the HSM when the user authenticates if there's no validation of the HSM's keys). And now all they need is the PIN. Turning the PIN into an encryption key is done using the Argon2id key derivation function, using 32 iterations and a memory cost of 16MB (the Juicebox white paper says 16KB, but (a) that's laughably small and (b) the code says 16 * 1024 in an argument that takes kilobytes), which makes it computationally and moderately memory expensive to generate the encryption key used to decrypt the private key. How expensive? Well, on my (not very fast) laptop, that takes less than 0.2 seconds. How many attempts to I need to crack the PIN? Twitter's chosen to fix that to 4 digits, so a maximum of 10,000. You aren't going to need many machines running in parallel to bring this down to a very small amount of time, at which point private keys can, to a first approximation, be extracted at will.

Juicebox attempts to defend against this by supporting sharding your key over multiple backends, and only requiring a subset of those to recover the original. I can't find any evidence that Twitter's does seem to be making use of this,Twitter uses three backends and requires data from at least two, but all the backends used are under x.com so are presumably under Twitter's direct control. Trusting the keystore without needing to trust whoever's hosting it requires a trustworthy communications mechanism between the client and the keystore. If the device you're talking to can prove that it's an HSM that implements the attempt limiting protocol and has no other mechanism to export the data, this can be made to work. Signal makes use of something along these lines using Intel SGX for contact list and settings storage and recovery, and Google and Apple also have documentation about how they handle this in ways that make it difficult for them to obtain backed up key material. Twitter has no documentation of this, and as far as I can tell does nothing to prove that the backend is in any way trustworthy. (Edit to add: The Juicebox API does support authenticated communication between the client and the HSM, but that relies on you having some way to prove that the public key you're presented with corresponds to a private key that only exists in the HSM. Twitter gives you the public key whenever you communicate with them, so even if they've implemented this properly you can't prove they haven't made up a new key and MITMed you the next time you retrieve your key)

On the plus side, Juicebox is written in Rust, so Elon's not 100% wrong. Just mostly wrong.

But ok, at least you've got viable end-to-end encryption even if someone can put in some (not all that much, really) effort to obtain your private key and render it all pointless? Actually no, since you're still relying on the Twitter server to give you the public key of the other party and there's no out of band mechanism to do that or verify the authenticity of that public key at present. Twitter can simply give you a public key where they control the private key, decrypt the message, and then reencrypt it with the intended recipient's key and pass it on. The support page makes it clear that this is a known shortcoming and that it'll be fixed at some point, but they said that about the original encrypted DM support and it never was, so that's probably dependent on whether Elon gets distracted by something else again. And the server knows who and when you're messaging even if they haven't bothered to break your private key, so there's a lot of metadata leakage.

Signal doesn't have these shortcomings. Use Signal.

[1] I'll respect their name change once Elon respects his daughter

[2] There are implementations written in Rust, but Twitter's using the C one with these JNI bindings

[3] Or someone nominally trustworthy but who's been compelled to act against your interests - even if Elon were absolutely committed to protecting all his users, his overarching goals for Twitter require him to have legal presence in multiple jurisdictions that are not necessarily above placing employees in physical danger if there's a perception that they could obtain someone's encryption keys
brumka: (Default)
[personal profile] brumka
У Экслера наткнулся, красивое

Блажен погибающий в первом бою,
с собой даже мухи не взявший.
Я родину самозабвенно люблю,
как полную грудь комиссарши.

* * *

Обесточь уже пилораму
И туманом зашторь простор!
Мир так хочет обратно в маму,
В золотистый свой физраствор.

и в комментариях жгут (там ещё много очень смешного)

Солдат из меня по всему никакой —
Поэт в общем тоже неважный,
Пойду я в бою накроюсь п..дой
какой-нибудь комиссарши.



juan_gandhi: (Default)
[personal profile] juan_gandhi
 Ищут Артёма Тимофеева (я тоже - послал ему френдинг реквест).


См также https://telesyk.dreamwidth.org/2493751.html и https://pani-stosia.dreamwidth.org/255051.html

"А правда, хорошая бьіла идея, раздать всем захваченньім людям российские паспорта? Охуенная идея бьіла, я щитаю."


(no subject)

Jun. 2nd, 2025 11:28 am
brumka: (Default)
[personal profile] brumka
как-то пропустил этот монолог.  хотя я никогда не был в курсе российской эстрады.  но актуальненько, да



прогноз

Jun. 1st, 2025 12:06 pm
juan_gandhi: (Default)
[personal profile] juan_gandhi
Когда Россия совсем сдуется в смысле войны, у них начнутся репрессии, я полагаю. 

белый дыбр

May. 31st, 2025 08:54 pm
juan_gandhi: (Default)
[personal profile] juan_gandhi

 Утром поменял планы, как и планировал, и, после завтрака, ломанулся в нарнию замазывать гипсокартон. Ну, стыки заделывать. Часа полтора проработал, но потом стало жарко, и устал. Прогресс идёт ничо; похоже, что за неделю эту половину крыши замажу.

Затем я поделал своё дуолинго, искупался, и поехал в Шарлот. А зачем? А там армянский фестиваль, в церкви Св. Саркиса. По дороге ещё в Волмарт заскочил, надо было там кисточку купить, за сыра. С сыром там фигня, конечно. Купил что-то такое, какое-то queso fresco. 

На этом фестивали ничего такого особо не было. Одна девушка угощала сангрией (на халяву), да в большом зале толпа людей сидела за столом, и все обедали. В меню была какая-то фигня - шашлыки, и всё, остальные блюда израильской кухни. И больше ничего. Я пошёл назад к машине, чо там. Странным образом по дороге половина народу со мной здоровалась. Или я со свой бородой похож на Св. Саркиса? Хз. 

Пока ездил, слушал французскую передачу про "хороший развод". Ещё раз послушаю, а то там не всё понятно.

На обратном пути заехал ещё в винный магазин, купил бутылку себастьяни и бутылку какого-то бордосского. Ну чо, тут вообще пить нечего же, в этом штате. Одни виски, а я даже Вудфорд Резерв не хочу. вообще на алкоголь не тянет.

Домой приехал, позанимался кодом (опять рефакторинг). Да искупнулся два раза. Да померял химию в бассейне. Всё хорошо, но только вода как-то уходит. Приходится подсаливать и доливать воды. А, ещё alcalinity низкая была, так добавил соды. Но это так, ради точности рецептуры.

Вечером пошёл гулять на оставшиеся 6000 шагов. Пока ходил, слушал интервью, которое Шейтельман давал одной умной женщине, первый раз слышу. Шейтельман вдруг тоже не клоуна играл, а вполне умного, культурного человека.

Вот и всё; сейчас пойду уже спать - ну, сначала дуолинго поделаю.

кино и домино

May. 26th, 2025 07:49 am
juan_gandhi: (Default)
[personal profile] juan_gandhi

 Смотрю ахинейный сериал "Keep Breathing". Там молодая успешная аргентинка из Нью Йорка попадает в авиакатастрофу, она одна выживает, на Северных Территориях, в какой-то Инукук летела, или что-то. Авторы фильма, похоже, их Аргентины не выезжали, а снимали... ну, где придётся. Лиственные деревья там точно не приполярные. А хвойных что-то мало видать.

Самолёт вёз кеш и оксикодон. 

Короче, она там не пьёт воды из озера, потому что туда лоси писают. Она скрутила из дюраля (обломок самолёта) какую-то посудину, и там кипятит воду. Зато когда пошёл дождь, она расставила по пляжу массу баночек из-под оксиконтина, чтобы набрать питьевой воды. Это уже был пятый день.

А откуда огонь? А она взяла сотенную бумажку, и с помощью очков навела фокус, от солнца, и подожгла купюру. Как она дальше поддерживает огонь - бог весть, но он у неё постоянно горит.

Жрать ей таки захотелось на пятый день. Рыбу хотела поймать на зубной флосс, но что-то не получилось. Флосс порвался. Пошла в лес. Там набрала ягод "каких-то": красные, синие, и бурые. Одни ягоды оказались ядовитыми (какие ядовитые ягоды в тайге? А?!) Тогда она изучила говно медведя, поняла, какие там ягоды медведь ел, пошла в лес, нашла медведя, увидела, что он ест что-то вроде черники (но куст огромный), и с другого края того же куста стала собирать ягоды. В баночку из-под оксикодона, понятное дело.

Комары как будто не существуют для неё. Холода тоже нет. По лесу она ходит в короткой кофточке, вроде лифчика, и с рюкзачком. Спит же в красивом свитерочке, на коврике, под открытым небом. В тайге.

Один пассажир был сначала жив, но помер от потери крови - она его каким-то чудесным образом похоронила в лесу (чем копала?), и при этом не взяла у него никакой одежды. Ей и так хорошо.

Никуда идти не собирается; ждёт, когда её спасут. Должны же её спасти!

Показ её таёжной жизни перебивают воспоминаниями её нью-йоркской жизни; там она то успешная художница, то менеджерка в офисе, в стилее "Mad Men".

Короче, смотрю, как фильм абсурда, вроде "Андалузского Пса".

lies

May. 25th, 2025 09:21 pm
juan_gandhi: (Default)
[personal profile] juan_gandhi

Смотрю "The Woman in the House Across the Street from the Girl in the Window".

И там Анна говорит сама себе: "we tell so many lies to our children..."

Так я вот что скажу. Не все. Я своим детям никогда не врал вообще. И мне мои предки не врали. У нас такого в обычае не было, врать. Что можно было - это шутить. Прикалываться. А врать - нет. Но я наблюдал регулярно, как другие люди или врут своим детям, или несут всякую чушь. А дети искренне верят. И также думают, что им не врут, а типа сообщают сведения. Сложно, наверно, ребёнку представить, что ему папа или мама врёт. Ребёнок в такое поверить, похоже, не может. А если вдруг узнает? Мир же вывернется наизнанку. 

Profile

dimview: (Default)
dimview

November 2017

S M T W T F S
   12 34
56789 1011
1213141516 1718
192021 22232425
26 27 282930  

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 8th, 2025 06:41 am
Powered by Dreamwidth Studios