Results 738 comments of Andrew King

The BCEncrypt cipher is symmetric in other words decrypt and encrypt are the same. For the hashing see this comment in the source https://github.com/QuantumEntangledAndy/neolink/blob/f15fdaefbcfe5cde3b0289c1e106cb85f6d3d39b/crates/core/src/bc_protocol.rs#L436-L443 The code below is ```rust fn...

For the legacy though, I've discovered that you can actually skip the passwords and hashes and just send the header only without a body. That way we don't compromise the...

For testing start with `00 dc` that way no encryption is required (providing your camera allows that) In your neolink config you can set `max_encryption = "none"` to force neolink...

Here's the BCEncrypt in rust ```rust const XML_KEY: [u8; 8] = [0x1F, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78, 0xFF]; let key_iter = XML_KEY.iter().cycle().skip(offset as usize % 8); key_iter .zip(buf) .map(|(key,...

Maybe this, but haven't tested ```python XML_KEY = [0x1F, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78, 0xFF] # .iter means iterate (for loop) # .cycle means wrap around, so modulo #...

Also its symmetric so test like this where you just feed it back to get the orignal ```rust let zeros: [u8; 256] = [0; 256]; let decrypted = EncryptionProtocol::BCEncrypt.encrypt(0, &zeros[..]);...

> Do I just concanate the username and password directly after each-other (nothing in-between) then cap it at 31 chars with a \0 at the end (or pad with \0...

> When I look at a wireshark capture of your neolink program, the first message beeing send (which I am hoping is the legacy login) is actually 126 bytes long,...

> Oh and after I make the MD5-hash, should I then do some encryption of that body? I do see the decrypt methods documented, but I do not see the...

You can decrypt with bcencypt without the nonce. You just need the nonce for the password hash and aes