News for hackers. Stuff that matters.
Re:Wifibroadcast – Analog-like transmission of live video data by 0942v8653 on Thursday December 17, 2015 @09:17PM (#10756197)
Does this allow encryption of the video stream? Graceful signal degradation is a great feature, but I don't see how that would work when there is encryption.
Re:Wifibroadcast – Analog-like transmission of live video data by caf on Thursday December 17, 2015 @11:50PM (#10756701)
Encryption would work just fine if you used a stream cipher, like ChaCha20.

(With a stream cipher, a single bit error in the encrypted data results in a single bit error in the decrypted data).

Re:Wifibroadcast – Analog-like transmission of live video data by rolfn on Friday December 18, 2015 @03:13AM (#10757329)
If the receiver miss a chunk of data, the stream cipher is not able to re-synchronize (as opposed to a video-stream which synchronizes on I-frames)
Re:Wifibroadcast – Analog-like transmission of live video data by caf on Friday December 18, 2015 @05:52PM (#10761535)
Yes, to allow resynchronization you have to send the stream position at the start of each packet.
Re:Wifibroadcast – Analog-like transmission of live video data by Dylan16807 on Friday December 18, 2015 @02:53AM (#10757268)
A block cipher doesn't make errors all that big. Look at the two layer error correction on a CD. That would play extremely well with a block cipher if you wanted to.
Re:Wifibroadcast – Analog-like transmission of live video data by mrb on Friday December 18, 2015 @04:23AM (#10757523)
Of course it is possible to encrypt an unreliable unidirectional bitstream. (Tons of systems do this, eg. satellite video links.)

Contrary to what other commenters suggest, a proper stream cipher like ChaCha20 is not even needed. You could just use CTR mode, which turns any block cipher (like AES) in a stream cipher and prevents ciphertext bit errors from creating more plaintext bit errors. Also, transmit the counter every once in a while so that dropped packets don't prevent you from decrypting subsequent packets.

Re:Wifibroadcast – Analog-like transmission of live video data by taterbase on Thursday December 17, 2015 @09:26PM (#10756223)
Encryption won't work for this scenario as it reintroduces the problem of all or no data. Degraded encrypted data can't be decrypted successfully (yet?)
Re:Wifibroadcast – Analog-like transmission of live video data by MrRadar on Thursday December 17, 2015 @11:50PM (#10756703)
A stream cipher like ChaCha20 would work. Most stream ciphers (including ChaCha20 and RC4) work by generating a pseudorandom bitstream based on the key which is then xor'd with the cleartext to produce the ciphertext. Since neither the cleartext nor the ciphertext are used to generate the pseudorandom bits any individual bit flip in the ciphertext will only result in that bit being flipped in the cleartext, the same as if the data were not encrypted.
Re:Wifibroadcast – Analog-like transmission of live video data by x1798DE on Thursday December 17, 2015 @10:20PM (#10756399)
From my armchair position, I'd think that this is what error correcting codes are for, aren't they?
Re:Wifibroadcast – Analog-like transmission of live video data by nuand on Thursday December 17, 2015 @11:24PM (#10756616)
OFDM 802.11 rates already have a significant amount of Forward Error Correction. 802.11g uses a convolution encoder and Viterbi Decoder [1], and 802.11 HT rates (n, ac, ad) can also use Low Density Parity Codes (LDPC) [2]. The problem with Forward Error Correction is that it can't deal with too many sequential errors, so many modems use something known as an interleaver. An reorders bits as they are sent over the air, so instead of sending LSB to MSB or vice versa you are sending bits in a random yet mutually known order. This causes link quality issues such as interference to not interfere with continuous bits (to the benefit of the FEC decoder). The problem with an interleaver is that it causes latency to go up. If you interleave based on 256 bits of 2048bits, you can't decode blocks of data until you've received all of this bits. So the 288 bit interleaver that 802.11 uses won't cause many problems if you're streaming but if you are interleaving data across multiple packets you will notice a spike in video latency.

[1] https://en.wikipedia.org/wiki/Viterbi_algorithm [2] https://en.wikipedia.org/wiki/Low-density_parity-check_code

Re:Wifibroadcast – Analog-like transmission of live video data by taterbase on Thursday December 17, 2015 @10:54PM (#10756525)
Error correction (or redundant parity data as est mentioned in another reply) just kicks the can down the road.

Let's say you're using a 20/40 erasure encoding. You break a piece of data up into 20 pieces and create 20 extra parity pieces. Now you only need 20 out of the 40 to recreate the original data.

Are we encoding the encrypted data? Ok well we need at least 20 good pieces, and that's to decode the original data. This method doesn't allow for seamless degradation but allows for some data loss in the transmission (while effectively doubling the amount we're trying to push in the first place).

Let's say we're breaking up the original data, creating parity pieces and encrypting each little piece. Then it could decrypt each piece it got and use it and if it couldn't decrypt a piece just throw it away. This could potentially work but parity pieces are useless unless you are trying to recreate the original file neglecting the ability to degrade quality. So redundancy is more important in this scenario than parity.

But, if we make the encrypted pieces small enough, say each packet body, then that could probably work but be resource intensive. Encode/decode every packet, if successful insert into feed, else throw the packet away. This would work a lot like the existing technology just requiring some middle step of decrypting each packet body.

Re:Wifibroadcast – Analog-like transmission of live video data by Dylan16807 on Friday December 18, 2015 @03:08AM (#10757309)
> But, if we make the encrypted pieces small enough, say each packet body, then that could probably work

So in other words you can use what's basically the default mode of encryption, CBC. Each encrypted byte only depends on the adjacent 32 bytes, so you can allow errors through and they affect a couple pixels instead of a single pixel.

Re:Wifibroadcast – Analog-like transmission of live video data by taterbase on Friday December 18, 2015 @10:53AM (#10759049)
I wasn't aware of CBC at the time of writing this comment, thanks for pointing it out to me.

It seems if you lose any 32 bytes though you've lost the trail of encryption as you can't decrypt any subsequent pieces.

After reading other comments I think the only reliable solution is chacha20 where each packet can be encrypted/decrypted independently of others.

Re:Wifibroadcast – Analog-like transmission of live video data by Dylan16807 on Friday December 18, 2015 @02:26PM (#10760391)
https://upload.wikimedia.org/wikipedia/commons/2/2a/CBC_decr...

Let's assume CBC with AES. It encrypts in 16 byte blocks. If you slightly corrupt one block, you will fail to decrypt it entirely, and it will slightly corrupt the block after, but everything else will be fine.

There are modes of encryption where losing one bit will corrupt all subsequent bits.

There are also modes like GCM or stream ciphers like ChaCha20 where one corrupted bit will not corrupt any other bits at all.

In short: There are many options, and half of them are suitable for this.

Re:Wifibroadcast – Analog-like transmission of live video data by danellis on Friday December 18, 2015 @02:02AM (#10757122)
How much security do you lose if you encrypt each frame individually?
Re:Wifibroadcast – Analog-like transmission of live video data by est on Thursday December 17, 2015 @09:50PM (#10756305)
encrypt with a redundant parity data?
Re:Wifibroadcast – Analog-like transmission of live video data by mantasm on Thursday December 17, 2015 @10:22PM (#10756405)
How would you implement analog parity? Parity doesn't translate well as a concept into the analog space.

You can take an analog signal and "quantize" it into sixteen possible values so that you can apply a parity algorithm that returns sensible results and doesn't fail with expected noise, but you're digitizing the signal.

Re:Wifibroadcast – Analog-like transmission of live video data by sathackr on Friday December 18, 2015 @09:29AM (#10758588)
I don't understand what analog has to do with it? The video is digitized first, then error-correction (parity?) information added before transmission, so all parity would be related to the digital bitstream -- unless I missed something?
Re:Wifibroadcast – Analog-like transmission of live video data by 0942v8653 on Thursday December 17, 2015 @10:14PM (#10756379)
Even then I think it would still be all-or-nothing. That may increase the chances of "all" over "nothing" but not allow graceful degradation of the video.
Re:Wifibroadcast – Analog-like transmission of live video data by prutschman on Thursday December 17, 2015 @11:28PM (#10756629)
Hierarchical coding: send a low quality version of the video with high redundancy, and a higher quality refinement of the video with lesser redundancy.
Re:Wifibroadcast – Analog-like transmission of live video data by belleandsebasti on Friday December 18, 2015 @08:51AM (#10758366)
Just encrypt each packet individually in CBC or CTR mode with a new random IV per packet.

Hopefully things have structured such that 802.11 packets are divisible by video frames.