<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ntw/src, branch master</title>
<subtitle>experimental firmware for the Nitrokey Pro</subtitle>
<id>https://git.ireas.org/ntw/atom?h=master</id>
<link rel='self' href='https://git.ireas.org/ntw/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/'/>
<updated>2019-12-17T09:53:27Z</updated>
<entry>
<title>Allow missing safety documentation for unsafe functions</title>
<updated>2019-12-17T09:53:27Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-17T09:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=a1a32b62c097689829dd96d828cc3c5e7a4a79e6'/>
<id>urn:sha1:a1a32b62c097689829dd96d828cc3c5e7a4a79e6</id>
<content type='text'>
Our main function is unsafe as it uses the entry attribute.  clippy
requires a Safety section in the doc comment of public unsafe functions,
but as we don’t have any documentation yet, we disable the
clippy::missing_safety_doc lint.
</content>
</entry>
<entry>
<title>Remove label from assert_maximum_size macro</title>
<updated>2019-12-17T09:17:50Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-17T09:12:20Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=3c8f396f21dc75f733ef5eefe99afd0e9e798f40'/>
<id>urn:sha1:3c8f396f21dc75f733ef5eefe99afd0e9e798f40</id>
<content type='text'>
Since static_assertions 1.0.0, we no longer have to specify a label when
calling an assert macro.  Therefore we can also remove the label from
our own assert macro assert_maximum_size.
</content>
</entry>
<entry>
<title>Update static_assertions to 1.1.0</title>
<updated>2019-12-17T09:17:44Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-17T09:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=5724b87a1c9fcf66e6205af6732fc07e4c9d909d'/>
<id>urn:sha1:5724b87a1c9fcf66e6205af6732fc07e4c9d909d</id>
<content type='text'>
This patch updates the static_assertions dependency to 1.1.0.  This
bumps the minimum supported Rust version to 1.37.0.  As the labels have
been removed in version 1.0.0, we can now call the assertion macros
without an additional label.
</content>
</entry>
<entry>
<title>Update dependencies to newest versions</title>
<updated>2019-12-17T09:17:28Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-17T08:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=1dfd8694c6dfa31ba154456cd17ef2efe6bd7c7a'/>
<id>urn:sha1:1dfd8694c6dfa31ba154456cd17ef2efe6bd7c7a</id>
<content type='text'>
This patch updates all dependencies to the newest versions (except
static_assertions).  It replaces the Git versions of stm32f103xx-usb and
usb-device with crates.io versions of stm32-usbd (via stm32f1xx-hal) and
usb-device.

This bumps the minimum supported Rust version to 1.36.0 (for
stm32-usbd).  static_assertions is not updated as it would require an
even newer Rust version.
</content>
</entry>
<entry>
<title>Split struct Crc into trait Crc and struct Stm32Crc</title>
<updated>2019-02-20T23:16:00Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-20T23:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=853e613769087a4bf67023e42f7fc4f3b92339fb'/>
<id>urn:sha1:853e613769087a4bf67023e42f7fc4f3b92339fb</id>
<content type='text'>
There are different ways to implement the CRC check:  For testing, we
might want to calulate the CRC in the software.  On STM32 MCUs, we want
to use the CRC peripheral.

This patch splits the struct Crc into the Crc trait and the Stm32Crc
struct implementing Crc using the CRC peripheral.  The Nitrokey struct
can now accept any Crc implementation.
</content>
</entry>
<entry>
<title>Assert maximum size for command request and response structs</title>
<updated>2019-02-20T13:09:40Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-20T12:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=4b436755d5895cb7113bee135d451cdeb2cf465a'/>
<id>urn:sha1:4b436755d5895cb7113bee135d451cdeb2cf465a</id>
<content type='text'>
The request and response structs for a command should not be bigger than
the buffer they are read from or written to.  Therefore we add
assertions that enforce this property at compile time.
</content>
</entry>
<entry>
<title>Add static assertions for Request and Response size</title>
<updated>2019-02-20T11:50:32Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-20T11:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=e0d33dae2f2ab70b936467590284030d759f9db7'/>
<id>urn:sha1:e0d33dae2f2ab70b936467590284030d759f9db7</id>
<content type='text'>
The Request and Response types have to have a size of 64 bytes.
Previously, we only verified this property by visual inspection.
Accidental changes to the size could lead to runtime errors.  This patch
adds static assertions using the static_assertions crate to enforce this
property at compile time.
</content>
</entry>
<entry>
<title>Use arrays instead of slices where possible</title>
<updated>2019-02-20T11:50:25Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-20T11:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=0d162c3d9e6a220fe30768bedcb129bf04a2cc7b'/>
<id>urn:sha1:0d162c3d9e6a220fe30768bedcb129bf04a2cc7b</id>
<content type='text'>
To increase type safety, we use references to (sized) arrays instead of
slices where possible.
</content>
</entry>
<entry>
<title>Rename commands::COMMAND_LEN to device::RESPONSE_DATA_LEN</title>
<updated>2019-02-20T11:50:15Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-20T11:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=990063fb3ecfc6baeb51e4f57b3f75ee16bac56e'/>
<id>urn:sha1:990063fb3ecfc6baeb51e4f57b3f75ee16bac56e</id>
<content type='text'>
Previously, we had the device::REQUEST_DATA_LEN constant for the size of
the raw data in the request, and the commands::COMMAND_LEN constant for
the size of the raw data in the response.  This patch renames
commands::COMMAND_LEN to device::RESPONSE_DATA_LEN for consistency.  It
also introduces the {Request,Response}Data type aliases for [u8;
{REQUEST,RESPONSE}_DATA_LEN].
</content>
</entry>
<entry>
<title>Validate CRC of incoming data</title>
<updated>2019-02-19T22:24:50Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-19T22:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/ntw/commit/?id=1e127de5173e3b8fb62efc79f97651ca22694441'/>
<id>urn:sha1:1e127de5173e3b8fb62efc79f97651ca22694441</id>
<content type='text'>
The data sent with Set_Report requests contains a CRC which we so far
ignored.  This patch adds a Crc struct that uses the CRC peripheral to
calculate the CRC for some data and uses it to validate the CRC of the
received data.
</content>
</entry>
</feed>
