OSDN Git Service

shared/crypto: Extend bt_crypto_sign_att with sign counter
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>
Thu, 22 May 2014 19:06:15 +0000 (21:06 +0200)
committerSzymon Janc <szymon.janc@tieto.com>
Mon, 26 May 2014 08:27:21 +0000 (10:27 +0200)
commit87f79a9c7df88df6147e76db77c3a81c002ad7e6
tree8ab0cbc444ede4d9fc2dd24112f24f6e370e1eea
parent567d19e472a19a3c0960bfc61930b34fb1e57a8d
shared/crypto: Extend bt_crypto_sign_att with sign counter

Sign counter is use in two places during att signing:
1) Shall be concatenated with message to be sign as specified in BT spec
4.1, Vol[3], Part H, chapter 2.4.5

2) Shall be a part of signature send in the att packet as specified in
BT spec 4.1 Vol[3], Part C, chapter 10.4.1

With this patch, bt_crypto_sign_att returns signature as specified in 2)

This patch also updates unit tests so now it uses sign counter 0. Note
that test vectors no longer match that one from  NIST Special
Publication 800-38B
src/shared/crypto.c
src/shared/crypto.h
unit/test-crypto.c