1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Arduino MKR WAN 1310 の ATECC508 crypto chip

Posted at

Arduino MKR WAN 1310

image.png

Arduino MKR WAN 1310 は以下の主要なユニットから構成されています。

  • Cortex-M0 32-bit SAMD21
  • Murata CMWX1ZZABZ
  • ATECC508 crypto chip

ATECC508 機能を使う

このうち、ATECC508 は Microchip の暗号化チップとして鍵、署名管理、認証などの機能があります。
この機能を使うには、arduinolibs ライブラリをインストールして使います。

image.png
https://github.com/rweather/arduinolibs

試しに、サンプルプログラム
「ファイル」-「スケッチ例」-「ArduinoECCX08」-「ECCX08RandomNumber」
を実行してみたら以下のように出てきました。


The ECC508/ECC608 is not locked!

ロック作業を行ってライブラリを使えるようにする

使用するには、構成を保存しているEEPROMについて変更しないようにロックして使うことが必要らしいです。
ロックに仕方について、こちらの記事に基づいて設定しましました。

「Arduino MKR WAN 1310に搭載されたECC508を利用して乱数を生成してみる」
https://neocat.hatenablog.com/

「ファイル」-「スケッチ例」-「Tools」-「ECCX08CSR」で設定します。


ECCX08 Serial Number = 012396DE1D2F055FEE

The ECCX08 on your board is not locked, would you like to PERMANENTLY configure and lock it now? (y/N) [N]: y
ECCX08 locked successfully


この後CSRの設定がはじまったので続けてみます。

Hi there, in order to generate a new CSR for your board, we'll need the following information ...

Country Name (2 letter code) []: 
State or Province Name (full name) []: Tokyo
Locality Name (eg, city) []: Adachi
Organization Name (eg, company) []: Nanbu works Inc.
Organizational Unit Name (eg, section) []: HQ
Common Name (e.g. server FQDN or YOUR name) [012396DE1D2F055FEE]: Yoshimasa Kawano
What slot would you like to use? (0 - 4) [0]: 0
Would you like to generate a new private key? (Y/n) [Y]: Y

Here's your CSR, enjoy!

このあとCSRが表示されました。

乱数を発生させてみる

改めて、「ECCX08RandomNumber」実行します


Random number = 33979
Random number = 58641
Random number = 56484
.
.
.

うまくいったみたいです

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?