diff --git a/qrcrypt.py b/qrcrypt.py index 90cf8d4..c161477 100644 --- a/qrcrypt.py +++ b/qrcrypt.py @@ -46,6 +46,6 @@ if __name__ == '__main__': elif sys.argv[1] == '-D': with open(sys.argv[2],'rb')as f:sk=f.read() e=sys.stdin.buffer.read();epk=e[:32];n=e[32:56];rss=ecdh(epk,sk);k=hcc20(rss,b'\x00'*24);k=hcc20(k, n[:16]);n=b'\x00'*4+n[16:];c=e[56:-16] - if not secrets.compare_digest(e[-16:],tag(k,n,c)):pe('Error: auth fail',file=sys.stderr) + if not secrets.compare_digest(e[-16:],tag(k,n,c)):pe('Error: auth fail') else:sys.stdout.buffer.write(bytes(cc20(k,n,c))) else:us()