gozz

joined 2 years ago
[–] gozz@lemmy.world 1 points 14 hours ago (1 children)

No, I have been trying to actually be helpful and informative for people trying to understand this article and video, given that referring to what was done here as a digital system is functionally meaningless and misleading. I am pretty sure the pedantry started with you talking about CPUs being electronic.

But at this point I believe your use of language in this discussion to be so absurdly reductive that I do not think this conversation is salvageable. What you appear to take issue with seems to keep changing and refining until the argument appears to be that any system that communicates information is apparently a digital communications system, so long as you can imagine an arbitrary scheme to interpret at least one bit of information from the signal, regardless of whether that was the message intended to be communicated. It would appear we have ended up with a "digital" storage system wherein a human observes the signal and decides one bit of whether or not it looks like a bird. Though I suppose "bird" was the only symbol in the protocol, so it may actually be a zero-bit system.

If the scheme successfully communicates zero bits of information, you might as well stop bothering to listen for the signal, and miss nothing of value. In fact I should probably do exactly that with this thread.

[–] gozz@lemmy.world 3 points 22 hours ago

Yes, that would be a digital modulation. That is decidedly not what is being done with the bird. The input data is the "PNG" of the bird, which is then not digitally modulated, but converted to an analogue signal and later redigitized. If the file has been converted to a series of pulses at different frequencies (the equivalent of your black and white squares) that would be a digital modulation. I am not arguing that this is not possible. My original comment explicitly says I would like to see a follow up with actual modulation. But just because it is possible to run dialup over an analogue phone line does not mean that calling your grandma on that same phone is a digital communication system. Some computers back in the day could modulate and record data on commercial audio cassettes. That does not mean that if I record something off the radio and play it back later that's a digital copy of the song.

[–] gozz@lemmy.world 2 points 22 hours ago (3 children)

I suppose you have caught me out slightly lacking in precision or pedantry. A digital to analogue modulation scheme is able to exactly reconstruct the original digital signal within the design tolerances for noise and distortion. Yes, eventually a signal may degrade or be corrupted, but prior to that point the reproduction is literally and exactly perfect. That exactitude is just about the definition of a digital system. This bird system is incapable of reproducing the input image of the bird exactly. It is not a digital communication system, unless you consider the "PNG" of the bird to have not been the message being carried.

[–] gozz@lemmy.world 1 points 22 hours ago (1 children)

It isn't a digital channel because it does not reproduce digital data. Unless it's a one-bit signal of "does this look like a bird? yes/no", but then the human making that assessment is part of the channel. To claim this is a digital system would require us to be so reductive as to redefine the meaning of the word.

[–] gozz@lemmy.world 2 points 1 day ago* (last edited 1 day ago) (5 children)

Yes, the near-identical sentences (only drawing a distinction between the processes where one exists) would indicate that. The "heard by the bird" and "reproduced by the bird" steps were also the same. But this is necessary context to make clear the digital data ("bit-stream") that is being modulated into the signal.

It is far from "exactly the same". The similarity is only in that both go through the same analogue channel. The entire point is that the modulated signal can be reconstructed exactly, while the spectrogram cannot.

The article title says they converted a PNG and the bird was able to "recall the file", and yet it produced an indisputably different file. That it looks vaguely the same to the cursory human observer does not make it the same file.

[–] gozz@lemmy.world 1 points 1 day ago* (last edited 1 day ago) (6 children)

Precisely... And digital modulation's entire purpose is for a digital signal to survive those distortions bit-for-bit perfect. Even if we call the digitally-generated spectrogram digital information, the bird simply did not reproduce it exactly. Whatever time, frequency, and amplitude resolution you apply to the signal, if it's low enough that the bird reproduced the signal exactly within that discretized scheme, then it simply did not achieve 2 MB/s. I would bet that the Shannon capacity of this bird is simply nowhere near 2 MB/s.

[–] gozz@lemmy.world 11 points 2 days ago (9 children)

Exactly. Digital logic, when implemented in analogue, generally have to have forbidden zones where a signal in that range is considerer invalid. Regardless of implementation, digital is about the discretized logic of the system. That is explicitly the whole point of digital: Minor analogue distortion does not change the information content of the signal unless it is so bad as to flip a bit.

[–] gozz@lemmy.world 5 points 2 days ago* (last edited 2 days ago) (7 children)

The whole sequence is:

  • Digitally synthesized spectrogram (lossless)
  • Played through a DAC and speaker to produce an analogue signal (lossy)
  • Heard by the bird (analogue, lossy)
  • Reproduced by the bird (analogue, lossy)
  • Captured by an ADC as a digital audio signal (lossy)
  • Spectrum-analysed to observe a similar (but corrupted) reproduction of the shape in the original spectrogram

To be transferring digital information, we would instead need to modulate and demodulate the digital signal (exactly like an old modem) so that the analogue corruption does not affect the digital signal:

  • Image file (lossless)
  • Bit stream (lossless)
  • Analogue modulation of bit stream played through DAC (lossy)
  • Heard by the bird (lossy)
  • Reproduced by the bird (lossy)
  • Demodulated to recover exact bit stream despite distortion (lossless again)
  • Decode bit stream to recover original image file, bit-for-bit perfect

I extremely doubt that this bird is capable of 2MB/s. For reference that would make it 280+ times fast than dialup, and barely slower than ADSL. This setup is basically just using the bird instead of a telephone line.

[–] gozz@lemmy.world 19 points 2 days ago (30 children)

Not to be a wet blanket, but every time this comes up I get annoyed by some factual inaccuracies in the articles about this. It is not digital! He drew an image on a computer, but converted it to an analogue spectrogram to store on the bird. That's neat as hell, but it's not digital. The image that he got back was slightly corrupted.

Now I would be fascinated to see a follow-up seeing if you can actually modulate a digital signal and have is survive a round trip through the bird bit-for-bit accurate. I suspect in reality it would be much lower data rate, but definitely not nothing!

1
submitted 7 months ago* (last edited 4 months ago) by gozz@lemmy.world to c/selfhosted@lemmy.world
 

A common application of security keys is as a hardware-backed SSH key. I have lately been curious as to whether it would be possible to use one as an SSH host key. It seems like it should be straightforward enough, it's just another SSH key after all, if it works as a client identity key, why wouldn't it work as a host key?

So I had a mess around with this, but haven't been able to get it to work. Using sudo ssh-keygen -t ed25519-sk -O no-touch-required (or with -O resident as well) just ends up with the connection being refused and the auth log showing sshd: no hostkeys available -- exiting.

I had a look at the source for OpenSSH, but after 10 minutes of digging can find no indication of why it would cosider this to not be an ED25519_SK key, which the code explicitly accepts as a host key.

If anyone has any ideas for what is going wrong or has better luck, I would love to hear the details.

(Posted in selfhosted because this is the most prominent community that talks about ssh I can find, somewhat unsurprisingly)

EDIT to emphasize that this is talk about host keys like /etc/ssh/ssh_host_ed25519, not client keys. My attempts to make a working "ssh_host_ed25519_sk" are what I am reporting on here.

UPDATE: It works! So it ended up being a combination of a couple of confusing things, I believe.

One is that there is an old bug that means that ssh-keygen -K will accidentally make keys require user interaction again, which sshd then ignores as though they don't exist. I believe this is what I was seeing previously, as I had been messing around with the keys elsewhere to verify them and then used ssh-keygen -K as a convenient way to drop them into /etc/ssh. But that alone would not have been enough to stop me, as I did try generating them in-place...

But I generated them with the name ssh_host_ed25519_sk_key, following the naming convention of id_ed25519_sk, and the fact that ED25519_SK is listed as a different enum value in the OpenSSH source. However, even upon stripping out every other key and enabling debug logging, it simply never even tried to touch that file as far as I could tell. So as an experiment I renamed it to ssh_host_ed25519_key as though it is a normal key, and that immediately worked exactly as expected!

So my final steps to get this working were:

sudo ssh-keygen -t ed25519_sk -O resident -O no-touch-required
Generating public/private ed25519-sk key pair.
You may need to touch your authenticator to authorize key generation.
Enter PIN for authenticator: 
Enter file in which to save the key (/root/.ssh/id_ed25519_sk): /etc/ssh/ssh_host_ed25519_key
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub

Testing sshing into the host then works flawlessly as long as the security key is plugged in, and the connection is rejected the moment it is unplugged.

So this has been an interesting little experiment. Notably, because of the requirement for sshd to interact with the security key, this will mess up anything else (like age) that uses the key directly as a cryptographic identity and isn't smart enough to reach out to the security key.

Given how long it took me to find any information about this, hopefully this will serve someone well in future.