Lightning Network – What is special about the chacha20 flow code with poly1305 for message authentication codes?

Why are chacha20 stream cipher and poly1305 so special for message authentication codes?

There is nothing special about the combination. It is simply a combination of two constructs (ChaCha20 for stream ciphers, Poly1305 for MAC) designed with similar objectives (optimized for software implementations on common general hardware, 128-bit security level). ). In addition, the key derivation is informally normalized, which allows the use of a unique key for encryption and authentication. Having real world constructs (eg OpenSSH) using these constructs gives confidence in security.

What does it mean that one can search effectively for any position in the key stream in a constant time?

Suppose you receive n GiB of incoming encrypted data, but for some reason you are only interested in the last 1 MiB. With typical flow ciphers, you must perform a work O (n) to "ignore" the first n GiB. ChaCha20 decrypts the last MiB with work O (1) – essentially bypassing the encryption output for an arbitrary position (aligned to a limit of at least 64 bytes) with as much work as sequentially decoding.