[OpenTRV-dev] AES-GCM protected secure frames implemented

Damon Hart-Davis dhd at exnet.com
Wed Jan 13 08:15:03 GMT 2016

> Anyone who wishes to inspect and critique and review the implementation in OTRadioLink and OTAESGCM and the spec please do, and I’ll be happy to guide you through it as necessary.  There is always more that could be done, but it has to be robust and reliable as it stands, eg no buffer overflow possible even on maliciously-constructed received frames.


Well, I was actually asked for the code locations, so I copy the relevant part of the email below!

Also, a reminder of one way to get to the currennt spec:



The code is in two libraries:

The OTAESGCM library contains the base AES-GCM code plus some wrappers, and some unit tests including against NIST test vectors.


The wrapping into secure frames as per the spec (though not all beautiful yet) is in the OTRadioLink library:


and specifically in these header and implementation files:


and with this unit test set:


We have cross tested against a Java reference implementation (in tests) to catch some implementation tests and to work against a known-good AES-GCM implementation.


All this needs tidying up, more documentation, etc, etc, but I think that the core is robust and complete.



More information about the OpenTRV-dev mailing list