|
CryptoAuthLib
Atmel CryptoAuthentication Library
|
Atmel Crypto Auth device command object - this is a command builder only, it does not send the command. The result of a command method is a fully formed packet, ready to send to the ATCAIFace object to dispatch. More...
Go to the source code of this file.
Data Structures | |
| struct | ATCAPacket |
| an ATCA packet structure. This is a superset of the packet transmitted on the wire. It's also used as a buffer for receiving the response More... | |
Macros | |
| #define | ATCA_CMD_SIZE_MIN ((uint8_t)7) |
| minimum number of bytes in command (from count byte to second CRC byte) More... | |
| #define | ATCA_CMD_SIZE_MAX ((uint8_t)4 * 36 + 7) |
| maximum size of command packet (Verify) More... | |
| #define | CMD_STATUS_SUCCESS ((uint8_t)0x00) |
| status byte for success More... | |
| #define | CMD_STATUS_WAKEUP ((uint8_t)0x11) |
| status byte after wake-up More... | |
| #define | CMD_STATUS_BYTE_PARSE ((uint8_t)0x03) |
| command parse error More... | |
| #define | CMD_STATUS_BYTE_ECC ((uint8_t)0x05) |
| command ECC error More... | |
| #define | CMD_STATUS_BYTE_EXEC ((uint8_t)0x0F) |
| command execution error More... | |
| #define | CMD_STATUS_BYTE_COMM ((uint8_t)0xFF) |
| communication error More... | |
opcodes for ATATECC Commands | |
| #define | ATCA_CHECKMAC ((uint8_t)0x28) |
| CheckMac command op-code. More... | |
| #define | ATCA_DERIVE_KEY ((uint8_t)0x1C) |
| DeriveKey command op-code. More... | |
| #define | ATCA_INFO ((uint8_t)0x30) |
| Info command op-code. More... | |
| #define | ATCA_GENDIG ((uint8_t)0x15) |
| GenDig command op-code. More... | |
| #define | ATCA_GENKEY ((uint8_t)0x40) |
| GenKey command op-code. More... | |
| #define | ATCA_HMAC ((uint8_t)0x11) |
| HMAC command op-code. More... | |
| #define | ATCA_LOCK ((uint8_t)0x17) |
| Lock command op-code. More... | |
| #define | ATCA_MAC ((uint8_t)0x08) |
| MAC command op-code. More... | |
| #define | ATCA_NONCE ((uint8_t)0x16) |
| Nonce command op-code. More... | |
| #define | ATCA_PAUSE ((uint8_t)0x01) |
| Pause command op-code. More... | |
| #define | ATCA_PRIVWRITE ((uint8_t)0x46) |
| PrivWrite command op-code. More... | |
| #define | ATCA_RANDOM ((uint8_t)0x1B) |
| Random command op-code. More... | |
| #define | ATCA_READ ((uint8_t)0x02) |
| Read command op-code. More... | |
| #define | ATCA_SIGN ((uint8_t)0x41) |
| Sign command op-code. More... | |
| #define | ATCA_UPDATE_EXTRA ((uint8_t)0x20) |
| UpdateExtra command op-code. More... | |
| #define | ATCA_VERIFY ((uint8_t)0x45) |
| GenKey command op-code. More... | |
| #define | ATCA_WRITE ((uint8_t)0x12) |
| Write command op-code. More... | |
| #define | ATCA_ECDH ((uint8_t)0x43) |
| ECDH command op-code. More... | |
| #define | ATCA_COUNTER ((uint8_t)0x24) |
| Counter command op-code. More... | |
| #define | ATCA_SHA ((uint8_t)0x47) |
| SHA command op-code. More... | |
Definitions of Data and Packet Sizes | |
| #define | ATCA_BLOCK_SIZE (32) |
| size of a block More... | |
| #define | ATCA_WORD_SIZE (4) |
| size of a word More... | |
| #define | ATCA_PUB_KEY_PAD (4) |
| size of the public key pad More... | |
| #define | ATCA_SERIAL_NUM_SIZE (9) |
| number of bytes in the device serial number More... | |
| #define | ATCA_RSP_SIZE_VAL ((uint8_t)7) |
| size of response packet containing four bytes of data More... | |
| #define | ATCA_KEY_COUNT (16) |
| number of keys More... | |
| #define | ATCA_CONFIG_SIZE (128) |
| size of configuration zone More... | |
| #define | ATCA_SHA_CONFIG_SIZE (88) |
| size of configuration zone More... | |
| #define | ATCA_OTP_SIZE (64) |
| size of OTP zone More... | |
| #define | ATCA_DATA_SIZE (ATCA_KEY_COUNT * ATCA_KEY_SIZE) |
| size of data zone More... | |
| #define | ATCA_COUNT_SIZE ((uint8_t)1) |
| Number of bytes in the command packet Count. More... | |
| #define | ATCA_CRC_SIZE ((uint8_t)2) |
| Number of bytes in the command packet CRC. More... | |
| #define | ATCA_PACKET_OVERHEAD (ATCA_COUNT_SIZE + ATCA_CRC_SIZE) |
| Number of bytes in the command packet. More... | |
| #define | ATCA_PUB_KEY_SIZE (64) |
| size of a p256 public key More... | |
| #define | ATCA_PRIV_KEY_SIZE (32) |
| size of a p256 private key More... | |
| #define | ATCA_SIG_SIZE (64) |
| size of a p256 signature More... | |
| #define | ATCA_KEY_SIZE (32) |
| size of a symmetric SHA key More... | |
| #define | RSA2048_KEY_SIZE (256) |
| size of a RSA private key More... | |
| #define | ATCA_RSP_SIZE_MIN ((uint8_t)4) |
| minimum number of bytes in response More... | |
| #define | ATCA_RSP_SIZE_4 ((uint8_t)7) |
| size of response packet containing 4 bytes data More... | |
| #define | ATCA_RSP_SIZE_72 ((uint8_t)75) |
| size of response packet containing 64 bytes data More... | |
| #define | ATCA_RSP_SIZE_64 ((uint8_t)67) |
| size of response packet containing 64 bytes data More... | |
| #define | ATCA_RSP_SIZE_32 ((uint8_t)35) |
| size of response packet containing 32 bytes data More... | |
| #define | ATCA_RSP_SIZE_MAX ((uint8_t)75) |
| maximum size of response packet (GenKey and Verify command) More... | |
Definitions for Command Parameter Ranges | |
| #define | ATCA_KEY_ID_MAX ((uint8_t)15) |
| maximum value for key id More... | |
| #define | ATCA_OTP_BLOCK_MAX ((uint8_t)1) |
| maximum value for OTP block More... | |
Definitions for Indexes Common to All Commands | |
| #define | ATCA_COUNT_IDX (0) |
| command packet index for count More... | |
| #define | ATCA_OPCODE_IDX (1) |
| command packet index for op-code More... | |
| #define | ATCA_PARAM1_IDX (2) |
| command packet index for first parameter More... | |
| #define | ATCA_PARAM2_IDX (3) |
| command packet index for second parameter More... | |
| #define | ATCA_DATA_IDX (5) |
| command packet index for data load More... | |
| #define | ATCA_RSP_DATA_IDX (1) |
| buffer index of data in response More... | |
Definitions for Zone and Address Parameters | |
| #define | ATCA_ZONE_CONFIG ((uint8_t)0x00) |
| Configuration zone. More... | |
| #define | ATCA_ZONE_OTP ((uint8_t)0x01) |
| OTP (One Time Programming) zone. More... | |
| #define | ATCA_ZONE_DATA ((uint8_t)0x02) |
| Data zone. More... | |
| #define | ATCA_ZONE_MASK ((uint8_t)0x03) |
| Zone mask. More... | |
| #define | ATCA_ZONE_ENCRYPTED ((uint8_t)0x40) |
| Zone bit 6 set: Write is encrypted with an unlocked data zone. More... | |
| #define | ATCA_ZONE_READWRITE_32 ((uint8_t)0x80) |
| Zone bit 7 set: Access 32 bytes, otherwise 4 bytes. More... | |
| #define | ATCA_ADDRESS_MASK_CONFIG (0x001F) |
| Address bits 5 to 7 are 0 for Configuration zone. More... | |
| #define | ATCA_ADDRESS_MASK_OTP (0x000F) |
| Address bits 4 to 7 are 0 for OTP zone. More... | |
| #define | ATCA_ADDRESS_MASK (0x007F) |
| Address bit 7 to 15 are always 0. More... | |
Definitions for ECC Key type | |
| #define | ATCA_B283_KEY_TYPE 0 |
| B283 NIST ECC key. More... | |
| #define | ATCA_K283_KEY_TYPE 1 |
| K283 NIST ECC key. More... | |
| #define | ATCA_P256_KEY_TYPE 4 |
| P256 NIST ECC key. More... | |
Definitions for the ECDH Command | |
| #define | ECDH_PREFIX_MODE ((uint8_t)0x00) |
| #define | ECDH_COUNT (71) |
| #define | ECDH_PUBKEYIN_SIZE (64) |
Definitions for the SHA Command | |
| #define | SHA_COUNT_SHORT ATCA_CMD_SIZE_MIN |
| #define | SHA_COUNT_LONG (7) |
| #define | ATCA_SHA_DIGEST_SIZE (32) |
| #define | SHA_DATA_MAX (64) |
| #define | SHA_BLOCK_SIZE (64) |
| #define | SHA_MODE_SHA256_START ((uint8_t)0x00) |
| Initialization, does not accept a message. More... | |
| #define | SHA_MODE_SHA256_UPDATE ((uint8_t)0x01) |
| Add 64 bytes in the meesage to the SHA context. More... | |
| #define | SHA_MODE_SHA256_END ((uint8_t)0x02) |
| Complete the calculation and return the digest. More... | |
| #define | SHA_MODE_SHA256_PUBLIC ((uint8_t)0x03) |
| Add 64 byte ECC public key in the slot to the SHA context. More... | |
| #define | SHA_MODE_HMAC_START ((uint8_t)0x04) |
| Initialization, HMAC calculation. More... | |
| #define | SHA_MODE_HMAC_UPDATE ((uint8_t)0x01) |
| Add 64 bytes in the meesage to the SHA context. More... | |
| #define | SHA_MODE_HMAC_END ((uint8_t)0x05) |
| Complete the HMAC computation and return digest. More... | |
Definitions for the CheckMac Command | |
| #define | CHECKMAC_MODE_IDX ATCA_PARAM1_IDX |
| CheckMAC command index for mode. More... | |
| #define | CHECKMAC_KEYID_IDX ATCA_PARAM2_IDX |
| CheckMAC command index for key identifier. More... | |
| #define | CHECKMAC_CLIENT_CHALLENGE_IDX ATCA_DATA_IDX |
| CheckMAC command index for client challenge. More... | |
| #define | CHECKMAC_CLIENT_RESPONSE_IDX (37) |
| CheckMAC command index for client response. More... | |
| #define | CHECKMAC_DATA_IDX (69) |
| CheckMAC command index for other data. More... | |
| #define | CHECKMAC_COUNT (84) |
| CheckMAC command packet size. More... | |
| #define | CHECKMAC_MODE_CHALLENGE ((uint8_t)0x00) |
| CheckMAC mode 0: first SHA block from key id. More... | |
| #define | CHECKMAC_MODE_BLOCK2_TEMPKEY ((uint8_t)0x01) |
| CheckMAC mode bit 0: second SHA block from TempKey. More... | |
| #define | CHECKMAC_MODE_BLOCK1_TEMPKEY ((uint8_t)0x02) |
| CheckMAC mode bit 1: first SHA block from TempKey. More... | |
| #define | CHECKMAC_MODE_SOURCE_FLAG_MATCH ((uint8_t)0x04) |
| CheckMAC mode bit 2: match TempKey.SourceFlag. More... | |
| #define | CHECKMAC_MODE_INCLUDE_OTP_64 ((uint8_t)0x20) |
| CheckMAC mode bit 5: include first 64 OTP bits. More... | |
| #define | CHECKMAC_MODE_MASK ((uint8_t)0x27) |
| CheckMAC mode bits 3, 4, 6, and 7 are 0. More... | |
| #define | CHECKMAC_CLIENT_CHALLENGE_SIZE (32) |
| CheckMAC size of client challenge. More... | |
| #define | CHECKMAC_CLIENT_RESPONSE_SIZE (32) |
| CheckMAC size of client response. More... | |
| #define | CHECKMAC_OTHER_DATA_SIZE (13) |
| CheckMAC size of "other data". More... | |
| #define | CHECKMAC_CLIENT_COMMAND_SIZE (4) |
| CheckMAC size of client command header size inside "other data". More... | |
| #define | CHECKMAC_CMD_MATCH (0) |
| CheckMAC return value when there is a match. More... | |
| #define | CHECKMAC_CMD_MISMATCH (1) |
| CheckMAC return value when there is a mismatch. More... | |
Definitions for the DeriveKey Command | |
| #define | DERIVE_KEY_RANDOM_IDX ATCA_PARAM1_IDX |
| DeriveKey command index for random bit. More... | |
| #define | DERIVE_KEY_TARGETKEY_IDX ATCA_PARAM2_IDX |
| DeriveKey command index for target slot. More... | |
| #define | DERIVE_KEY_MAC_IDX ATCA_DATA_IDX |
| DeriveKey command index for optional MAC. More... | |
| #define | DERIVE_KEY_COUNT_SMALL ATCA_CMD_SIZE_MIN |
| DeriveKey command packet size without MAC. More... | |
| #define | DERIVE_KEY_COUNT_LARGE (39) |
| DeriveKey command packet size with MAC. More... | |
| #define | DERIVE_KEY_RANDOM_FLAG ((uint8_t)4) |
| DeriveKey 1. parameter; has to match TempKey.SourceFlag. More... | |
| #define | DERIVE_KEY_MAC_SIZE (32) |
| DeriveKey MAC size. More... | |
Definitions for the GenDig Command | |
| #define | GENDIG_ZONE_IDX ATCA_PARAM1_IDX |
| GenDig command index for zone. More... | |
| #define | GENDIG_KEYID_IDX ATCA_PARAM2_IDX |
| GenDig command index for key id. More... | |
| #define | GENDIG_DATA_IDX ATCA_DATA_IDX |
| GenDig command index for optional data. More... | |
| #define | GENDIG_COUNT ATCA_CMD_SIZE_MIN |
| GenDig command packet size without "other data". More... | |
| #define | GENDIG_ZONE_CONFIG ((uint8_t)0) |
| GenDig zone id config. Use KeyID to specify any of the four 256-bit blocks of the Configuration zone. More... | |
| #define | GENDIG_ZONE_OTP ((uint8_t)1) |
| GenDig zone id OTP. Use KeyID to specify either the first or second 256-bit block of the OTP zone. More... | |
| #define | GENDIG_ZONE_DATA ((uint8_t)2) |
| GenDig zone id data. Use KeyID to specify a slot in the Data zone or a transport key in the hardware array. More... | |
| #define | GENDIG_ZONE_SHARED_NONCE ((uint8_t)3) |
| GenDig zone id shared nonce. KeyID specifies the location of the input value in the message generation. More... | |
| #define | GENDIG_ZONE_COUNTER ((uint8_t)4) |
| GenDig zone id counter. KeyID specifies the monotonic counter ID to be included in the message generation. More... | |
| #define | GENDIG_ZONE_KEY_CONFIG ((uint8_t)5) |
| GenDig zone id key config. KeyID specifies the slot for which the configuration information is to be included in the message generation. More... | |
Definitions for the GENKEY Command | |
| #define | GENKEY_MODE_IDX ATCA_PARAM1_IDX |
| GenKey command index for mode. More... | |
| #define | GENKEY_KEYID_IDX ATCA_PARAM2_IDX |
| GenKey command index for key id. More... | |
| #define | GENKEY_DATA_IDX (5) |
| GenKey command index for other data. More... | |
| #define | GENKEY_COUNT ATCA_CMD_SIZE_MIN |
| GenKey command packet size without "other data". More... | |
| #define | GENKEY_COUNT_DATA (10) |
| GenKey command packet size with "other data". More... | |
| #define | GENKEY_OTHER_DATA_SIZE (3) |
| GenKey size of "other data". More... | |
| #define | GENKEY_MODE_MASK ((uint8_t)0x1C) |
| GenKey mode bits 0 to 1 and 5 to 7 are 0. More... | |
| #define | GENKEY_MODE_PRIVATE ((uint8_t)0x04) |
| GenKey mode: private key generation. More... | |
| #define | GENKEY_MODE_PUBLIC ((uint8_t)0x00) |
| GenKey mode: public key calculation. More... | |
| #define | GENKEY_MODE_DIGEST ((uint8_t)0x08) |
| GenKey mode: PubKey digest will be created after the public key is calculated. More... | |
| #define | GENKEY_MODE_PUBKEY_DIGEST ((uint8_t)0x10) |
| GenKey mode: Calculate PubKey digest on the public key in KeyId. More... | |
Definitions for the HMAC Command | |
| #define | HMAC_MODE_IDX ATCA_PARAM1_IDX |
| HMAC command index for mode. More... | |
| #define | HMAC_KEYID_IDX ATCA_PARAM2_IDX |
| HMAC command index for key id. More... | |
| #define | HMAC_COUNT ATCA_CMD_SIZE_MIN |
| HMAC command packet size. More... | |
| #define | HMAC_MODE_FLAG_TK_RAND ((uint8_t)0x00) |
| HMAC mode bit 2: The value of this bit must match the value in TempKey.SourceFlag or the command will return an error. More... | |
| #define | HMAC_MODE_FLAG_TK_NORAND ((uint8_t)0x04) |
| HMAC mode bit 2: The value of this bit must match the value in TempKey.SourceFlag or the command will return an error. More... | |
| #define | HMAC_MODE_FLAG_OTP88 ((uint8_t)0x10) |
| HMAC mode bit 4: Include the first 88 OTP bits (OTP[0] through OTP[10]) in the message.; otherwise, the corresponding message bits are set to zero. Not applicable for ATECC508A. More... | |
| #define | HMAC_MODE_FLAG_OTP64 ((uint8_t)0x20) |
| HMAC mode bit 5: Include the first 64 OTP bits (OTP[0] through OTP[7]) in the message.; otherwise, the corresponding message bits are set to zero. If Mode[4] is set, the value of this mode bit is ignored. Not applicable for ATECC508A. More... | |
| #define | HMAC_MODE_FLAG_FULLSN ((uint8_t)0x40) |
| HMAC mode bit 6: If set, include the 48 bits SN[2:3] and SN[4:7] in the message.; otherwise, the corresponding message bits are set to zero. More... | |
| #define | HMAC_MODE_MASK ((uint8_t)0x74) |
| HMAC mode bits 0, 1, 3, and 7 are 0. More... | |
| #define | HMAC_DIGEST_SIZE (32) |
| HMAC size of digest response. More... | |
Definitions for the Info Command | |
| #define | INFO_PARAM1_IDX ATCA_PARAM1_IDX |
| Info command index for 1. parameter. More... | |
| #define | INFO_PARAM2_IDX ATCA_PARAM2_IDX |
| Info command index for 2. parameter. More... | |
| #define | INFO_COUNT ATCA_CMD_SIZE_MIN |
| Info command packet size. More... | |
| #define | INFO_MODE_REVISION ((uint8_t)0x00) |
| Info mode Revision. More... | |
| #define | INFO_MODE_KEY_VALID ((uint8_t)0x01) |
| Info mode KeyValid. More... | |
| #define | INFO_MODE_STATE ((uint8_t)0x02) |
| Info mode State. More... | |
| #define | INFO_MODE_GPIO ((uint8_t)0x03) |
| Info mode GPIO. More... | |
| #define | INFO_MODE_MAX ((uint8_t)0x03) |
| Info mode maximum value. More... | |
| #define | INFO_NO_STATE ((uint8_t)0x00) |
| Info mode is not the state mode. More... | |
| #define | INFO_OUTPUT_STATE_MASK ((uint8_t)0x01) |
| Info output state mask. More... | |
| #define | INFO_DRIVER_STATE_MASK ((uint8_t)0x02) |
| Info driver state mask. More... | |
| #define | INFO_PARAM2_MAX ((uint8_t)0x03) |
| Info param2 (state) maximum value. More... | |
| #define | INFO_SIZE ((uint8_t)0x04) |
| Info param2 (state) maximum value. More... | |
Definitions for the Lock Command | |
| #define | LOCK_ZONE_IDX ATCA_PARAM1_IDX |
| Lock command index for zone. More... | |
| #define | LOCK_SUMMARY_IDX ATCA_PARAM2_IDX |
| Lock command index for summary. More... | |
| #define | LOCK_COUNT ATCA_CMD_SIZE_MIN |
| Lock command packet size. More... | |
| #define | LOCK_ZONE_CONFIG ((uint8_t)0x00) |
| Lock zone is Config. More... | |
| #define | LOCK_ZONE_DATA ((uint8_t)0x01) |
| Lock zone is OTP or Data. More... | |
| #define | LOCK_ZONE_DATA_SLOT ((uint8_t)0x02) |
| Lock slot of Data. More... | |
| #define | LOCK_ZONE_NO_CRC ((uint8_t)0x80) |
| Lock command: Ignore summary. More... | |
| #define | LOCK_ZONE_MASK (0xBF) |
| Lock parameter 1 bits 6 are 0. More... | |
| #define | ATCA_UNLOCKED (0x55) |
| Value indicating an unlocked zone. More... | |
| #define | ATCA_LOCKED (0x00) |
| Value indicating a locked zone. More... | |
Definitions for the MAC Command | |
| #define | MAC_MODE_IDX ATCA_PARAM1_IDX |
| MAC command index for mode. More... | |
| #define | MAC_KEYID_IDX ATCA_PARAM2_IDX |
| MAC command index for key id. More... | |
| #define | MAC_CHALLENGE_IDX ATCA_DATA_IDX |
| MAC command index for optional challenge. More... | |
| #define | MAC_COUNT_SHORT ATCA_CMD_SIZE_MIN |
| MAC command packet size without challenge. More... | |
| #define | MAC_COUNT_LONG (39) |
| MAC command packet size with challenge. More... | |
| #define | MAC_MODE_CHALLENGE ((uint8_t)0x00) |
| MAC mode 0: first SHA block from data slot. More... | |
| #define | MAC_MODE_BLOCK2_TEMPKEY ((uint8_t)0x01) |
| MAC mode bit 0: second SHA block from TempKey. More... | |
| #define | MAC_MODE_BLOCK1_TEMPKEY ((uint8_t)0x02) |
| MAC mode bit 1: first SHA block from TempKey. More... | |
| #define | MAC_MODE_SOURCE_FLAG_MATCH ((uint8_t)0x04) |
| MAC mode bit 2: match TempKey.SourceFlag. More... | |
| #define | MAC_MODE_PTNONCE_TEMPKEY ((uint8_t)0x06) |
| MAC mode bit 0: second SHA block from TempKey. More... | |
| #define | MAC_MODE_PASSTHROUGH ((uint8_t)0x07) |
| MAC mode bit 0-2: pass-through mode. More... | |
| #define | MAC_MODE_INCLUDE_OTP_88 ((uint8_t)0x10) |
| MAC mode bit 4: include first 88 OTP bits. More... | |
| #define | MAC_MODE_INCLUDE_OTP_64 ((uint8_t)0x20) |
| MAC mode bit 5: include first 64 OTP bits. More... | |
| #define | MAC_MODE_INCLUDE_SN ((uint8_t)0x40) |
| MAC mode bit 6: include serial number. More... | |
| #define | MAC_CHALLENGE_SIZE (32) |
| MAC size of challenge. More... | |
| #define | MAC_SIZE (32) |
| MAC size of response. More... | |
| #define | MAC_MODE_MASK ((uint8_t)0x77) |
| MAC mode bits 3 and 7 are 0. More... | |
Definitions for the Nonce Command | |
| #define | NONCE_MODE_IDX ATCA_PARAM1_IDX |
| Nonce command index for mode. More... | |
| #define | NONCE_PARAM2_IDX ATCA_PARAM2_IDX |
| Nonce command index for 2. parameter. More... | |
| #define | NONCE_INPUT_IDX ATCA_DATA_IDX |
| Nonce command index for input data. More... | |
| #define | NONCE_COUNT_SHORT (27) |
| Nonce command packet size for 20 bytes of data. More... | |
| #define | NONCE_COUNT_LONG (39) |
| Nonce command packet size for 32 bytes of data. More... | |
| #define | NONCE_MODE_MASK ((uint8_t)0x03) |
| Nonce mode bits 2 to 7 are 0. More... | |
| #define | NONCE_MODE_SEED_UPDATE ((uint8_t)0x00) |
| Nonce mode: update seed. More... | |
| #define | NONCE_MODE_NO_SEED_UPDATE ((uint8_t)0x01) |
| Nonce mode: do not update seed. More... | |
| #define | NONCE_MODE_INVALID ((uint8_t)0x02) |
| Nonce mode 2 is invalid. More... | |
| #define | NONCE_MODE_PASSTHROUGH ((uint8_t)0x03) |
| Nonce mode: pass-through. More... | |
| #define | NONCE_MODE_RANDOM_OUT ((uint16_t)0x0000) |
| Nonce mode: output RandOut or single byte of zero. More... | |
| #define | NONCE_MODE_TEMPKEY_OUT ((uint16_t)0x0080) |
| Nonce mode: output RandOut or single byte of zero. More... | |
| #define | NONCE_NUMIN_SIZE (20) |
| Nonce data length. More... | |
| #define | NONCE_NUMIN_SIZE_PASSTHROUGH (32) |
| Nonce data length in pass-through mode (mode = 3) More... | |
Definitions for the Pause Command | |
| #define | PAUSE_SELECT_IDX ATCA_PARAM1_IDX |
| Pause command index for Selector. More... | |
| #define | PAUSE_PARAM2_IDX ATCA_PARAM2_IDX |
| Pause command index for 2. parameter. More... | |
| #define | PAUSE_COUNT ATCA_CMD_SIZE_MIN |
| Pause command packet size. More... | |
Definitions for the PrivWrite Command | |
| #define | PRIVWRITE_ZONE_IDX ATCA_PARAM1_IDX |
| PrivWrite command index for zone. More... | |
| #define | PRIVWRITE_KEYID_IDX ATCA_PARAM2_IDX |
| PrivWrite command index for KeyID. More... | |
| #define | PRIVWRITE_VALUE_IDX ( 5) |
| PrivWrite command index for value. More... | |
| #define | PRIVWRITE_MAC_IDX (41) |
| PrivWrite command index for MAC. More... | |
| #define | PRIVWRITE_COUNT (75) |
| PrivWrite command packet size. More... | |
| #define | PRIVWRITE_ZONE_MASK ((uint8_t)0x40) |
| PrivWrite zone bits 0 to 5 and 7 are 0. More... | |
| #define | PRIVWRITE_MODE_ENCRYPT ((uint8_t)0x40) |
| PrivWrite mode: encrypted. More... | |
Definitions for the Random Command | |
| #define | RANDOM_MODE_IDX ATCA_PARAM1_IDX |
| Random command index for mode. More... | |
| #define | RANDOM_PARAM2_IDX ATCA_PARAM2_IDX |
| Random command index for 2. parameter. More... | |
| #define | RANDOM_COUNT ATCA_CMD_SIZE_MIN |
| Random command packet size. More... | |
| #define | RANDOM_SEED_UPDATE ((uint8_t)0x00) |
| Random mode for automatic seed update. More... | |
| #define | RANDOM_NO_SEED_UPDATE ((uint8_t)0x01) |
| Random mode for no seed update. More... | |
| #define | RANDOM_NUM_SIZE ((uint8_t)0x20) |
| Number of bytes in the data packet of a random command. More... | |
Definitions for the Read Command | |
| #define | READ_ZONE_IDX ATCA_PARAM1_IDX |
| Read command index for zone. More... | |
| #define | READ_ADDR_IDX ATCA_PARAM2_IDX |
| Read command index for address. More... | |
| #define | READ_COUNT ATCA_CMD_SIZE_MIN |
| Read command packet size. More... | |
| #define | READ_ZONE_MASK ((uint8_t)0x83) |
| Read zone bits 2 to 6 are 0. More... | |
Definitions for the Sign Command | |
| #define | SIGN_MODE_IDX ATCA_PARAM1_IDX |
| Sign command index for mode. More... | |
| #define | SIGN_KEYID_IDX ATCA_PARAM2_IDX |
| Sign command index for key id. More... | |
| #define | SIGN_COUNT ATCA_CMD_SIZE_MIN |
| Sign command packet size. More... | |
| #define | SIGN_MODE_MASK ((uint8_t)0xC0) |
| Sign mode bits 0 to 5 are 0. More... | |
| #define | SIGN_MODE_INTERNAL ((uint8_t)0x00) |
| Sign mode 0: internal. More... | |
| #define | SIGN_MODE_INVALIDATE ((uint8_t)0x01) |
| Sign mode bit 1: Signature will be used for Verify(Invalidate) More... | |
| #define | SIGN_MODE_INCLUDE_SN ((uint8_t)0x40) |
| Sign mode bit 6: include serial number. More... | |
| #define | SIGN_MODE_EXTERNAL ((uint8_t)0x80) |
| Sign mode bit 7: external. More... | |
Definitions for the UpdateExtra Command | |
| #define | UPDATE_MODE_IDX ATCA_PARAM1_IDX |
| UpdateExtra command index for mode. More... | |
| #define | UPDATE_VALUE_IDX ATCA_PARAM2_IDX |
| UpdateExtra command index for new value. More... | |
| #define | UPDATE_COUNT ATCA_CMD_SIZE_MIN |
| UpdateExtra command packet size. More... | |
| #define | UPDATE_MODE_USER_EXTRA ((uint8_t)0x00) |
| UpdateExtra mode: update Config byte 84 (user extra) More... | |
| #define | UPDATE_MODE_SELECTOR ((uint8_t)0x01) |
| UpdateExtra mode: update Config byte 85 (selector) More... | |
| #define | UPDATE_MODE_DEC_COUNTER ((uint8_t)0x02) |
| UpdateExtra mode: decrement counter. More... | |
Definitions for the Verify Command | |
| #define | VERIFY_MODE_IDX ATCA_PARAM1_IDX |
| Verify command index for mode. More... | |
| #define | VERIFY_KEYID_IDX ATCA_PARAM2_IDX |
| Verify command index for key id. More... | |
| #define | VERIFY_DATA_IDX ( 5) |
| Verify command index for data. More... | |
| #define | VERIFY_256_STORED_COUNT ( 71) |
| Verify command packet size for 256-bit key in stored mode. More... | |
| #define | VERIFY_283_STORED_COUNT ( 79) |
| Verify command packet size for 283-bit key in stored mode. More... | |
| #define | VERIFY_256_VALIDATE_COUNT ( 90) |
| Verify command packet size for 256-bit key in validate mode. More... | |
| #define | VERIFY_283_VALIDATE_COUNT ( 98) |
| Verify command packet size for 283-bit key in validate mode. More... | |
| #define | VERIFY_256_EXTERNAL_COUNT (135) |
| Verify command packet size for 256-bit key in external mode. More... | |
| #define | VERIFY_283_EXTERNAL_COUNT (151) |
| Verify command packet size for 283-bit key in external mode. More... | |
| #define | VERIFY_256_KEY_SIZE ( 64) |
| Verify key size for 256-bit key. More... | |
| #define | VERIFY_283_KEY_SIZE ( 72) |
| Verify key size for 283-bit key. More... | |
| #define | VERIFY_256_SIGNATURE_SIZE ( 64) |
| Verify signature size for 256-bit key. More... | |
| #define | VERIFY_283_SIGNATURE_SIZE ( 72) |
| Verify signature size for 283-bit key. More... | |
| #define | VERIFY_OTHER_DATA_SIZE ( 19) |
| Verify size of "other data". More... | |
| #define | VERIFY_MODE_MASK ((uint8_t)0x03) |
| Verify mode bits 2 to 7 are 0. More... | |
| #define | VERIFY_MODE_STORED ((uint8_t)0x00) |
| Verify mode: stored. More... | |
| #define | VERIFY_MODE_VALIDATE_EXTERNAL ((uint8_t)0x01) |
| Verify mode: validate external. More... | |
| #define | VERIFY_MODE_EXTERNAL ((uint8_t)0x02) |
| Verify mode: external. More... | |
| #define | VERIFY_MODE_VALIDATE ((uint8_t)0x03) |
| Verify mode: validate. More... | |
| #define | VERIFY_MODE_INVALIDATE ((uint8_t)0x07) |
| Verify mode: invalidate. More... | |
| #define | VERIFY_KEY_B283 ((uint16_t)0x0000) |
| Verify key type: B283. More... | |
| #define | VERIFY_KEY_K283 ((uint16_t)0x0001) |
| Verify key type: K283. More... | |
| #define | VERIFY_KEY_P256 ((uint16_t)0x0004) |
| Verify key type: P256. More... | |
Definitions for the Write Command | |
| #define | WRITE_ZONE_IDX ATCA_PARAM1_IDX |
| Write command index for zone. More... | |
| #define | WRITE_ADDR_IDX ATCA_PARAM2_IDX |
| Write command index for address. More... | |
| #define | WRITE_VALUE_IDX ATCA_DATA_IDX |
| Write command index for data. More... | |
| #define | WRITE_MAC_VS_IDX ( 9) |
| Write command index for MAC following short data. More... | |
| #define | WRITE_MAC_VL_IDX (37) |
| Write command index for MAC following long data. More... | |
| #define | WRITE_MAC_SIZE (32) |
| Write MAC size. More... | |
| #define | WRITE_ZONE_MASK ((uint8_t)0xC3) |
| Write zone bits 2 to 5 are 0. More... | |
| #define | WRITE_ZONE_WITH_MAC ((uint8_t)0x40) |
| Write zone bit 6: write encrypted with MAC. More... | |
| #define | WRITE_ZONE_OTP ((uint8_t)1) |
| WRITE zone id OTP. More... | |
| #define | WRITE_ZONE_DATA ((uint8_t)2) |
| WRITE zone id data. More... | |
Response Size Definitions | |
| #define | CHECKMAC_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of DeriveKey command More... | |
| #define | DERIVE_KEY_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of DeriveKey command More... | |
| #define | GENDIG_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of GenDig command More... | |
| #define | GENKEY_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
| response size of GenKey command in Digest mode More... | |
| #define | GENKEY_RSP_SIZE_LONG ATCA_RSP_SIZE_72 |
| response size of GenKey command when generating key More... | |
| #define | HMAC_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of HMAC command More... | |
| #define | INFO_RSP_SIZE ATCA_RSP_SIZE_VAL |
| response size of Info command returns 4 bytes More... | |
| #define | LOCK_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of Lock command More... | |
| #define | MAC_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of MAC command More... | |
| #define | NONCE_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
| response size of Nonce command with mode[0:1] = 3 More... | |
| #define | NONCE_RSP_SIZE_LONG ATCA_RSP_SIZE_32 |
| response size of Nonce command More... | |
| #define | PAUSE_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of Pause command More... | |
| #define | PRIVWRITE_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of PrivWrite command More... | |
| #define | RANDOM_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of Random command More... | |
| #define | READ_4_RSP_SIZE ATCA_RSP_SIZE_VAL |
| response size of Read command when reading 4 bytes More... | |
| #define | READ_32_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of Read command when reading 32 bytes More... | |
| #define | SIGN_RSP_SIZE ATCA_RSP_SIZE_MAX |
| response size of Sign command More... | |
| #define | SHA_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of SHA command More... | |
| #define | UPDATE_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of UpdateExtra command More... | |
| #define | VERIFY_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of UpdateExtra command More... | |
| #define | WRITE_RSP_SIZE ATCA_RSP_SIZE_MIN |
| response size of Write command More... | |
| #define | ECDH_KEY_SIZE ATCA_BLOCK_SIZE |
| response size of ECDH command More... | |
| #define | ECDH_RSP_SIZE ATCA_RSP_SIZE_32 |
| response size of ECDH command More... | |
| #define | COUNTER_RSP_SIZE ATCA_RSP_SIZE_4 |
| response size of COUNTER command More... | |
| #define | SHA_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
| response size of SHA command More... | |
| #define | SHA_RSP_SIZE_LONG ATCA_RSP_SIZE_32 |
| response size of SHA command More... | |
Typedefs | |
| typedef struct atca_command * | ATCACommand |
Enumerations | |
| enum | ATCA_CmdMap { WAKE_TWHI, CMD_CHECKMAC, CMD_COUNTER, CMD_DERIVEKEY, CMD_ECDH, CMD_GENDIG, CMD_GENKEY, CMD_HMAC, CMD_INFO, CMD_LOCK, CMD_MAC, CMD_NONCE, CMD_PAUSE, CMD_PRIVWRITE, CMD_RANDOM, CMD_READMEM, CMD_SHA, CMD_SIGN, CMD_UPDATEEXTRA, CMD_VERIFY, CMD_WRITEMEM, CMD_LASTCOMMAND } |
Functions | |
| ATCACommand | newATCACommand (ATCADeviceType device_type) |
| constructor for ATCACommand More... | |
| ATCA_STATUS | atCheckMAC (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand CheckMAC method. More... | |
| ATCA_STATUS | atCounter (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Counter method. More... | |
| ATCA_STATUS | atDeriveKey (ATCACommand cacmd, ATCAPacket *packet, bool hasMAC) |
| ATCACommand DeriveKey method. More... | |
| ATCA_STATUS | atECDH (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand ECDH method. More... | |
| ATCA_STATUS | atGenDig (ATCACommand cacmd, ATCAPacket *packet, bool hasMACKey) |
| ATCACommand Generate Digest method. More... | |
| ATCA_STATUS | atGenKey (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Generate Key method. More... | |
| ATCA_STATUS | atHMAC (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand HMAC method. More... | |
| ATCA_STATUS | atInfo (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Info method. More... | |
| ATCA_STATUS | atLock (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Lock method. More... | |
| ATCA_STATUS | atMAC (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand MAC method. More... | |
| ATCA_STATUS | atNonce (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Nonce method. More... | |
| ATCA_STATUS | atPause (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Pause method. More... | |
| ATCA_STATUS | atPrivWrite (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand PrivWrite method. More... | |
| ATCA_STATUS | atRandom (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Random method. More... | |
| ATCA_STATUS | atRead (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Read method. More... | |
| ATCA_STATUS | atSHA (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand SHA method. More... | |
| ATCA_STATUS | atSign (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand Sign method. More... | |
| ATCA_STATUS | atUpdateExtra (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand UpdateExtra method. More... | |
| ATCA_STATUS | atVerify (ATCACommand cacmd, ATCAPacket *packet) |
| ATCACommand ECDSA Verify method. More... | |
| ATCA_STATUS | atWrite (ATCACommand cacmd, ATCAPacket *packet, bool hasMAC) |
| ATCACommand Write method. More... | |
| bool | atIsSHAFamily (ATCADeviceType deviceType) |
| determines if a given device type is a SHA device or a superset of a SHA device More... | |
| bool | atIsECCFamily (ATCADeviceType deviceType) |
| determines if a given device type is an ECC device or a superset of a ECC device More... | |
| ATCA_STATUS | isATCAError (uint8_t *data) |
| checks for basic error frame in data More... | |
| ATCA_STATUS | atInitExecTimes (ATCACommand cacmd, ATCADeviceType device_type) |
| initialize the execution times for a given device type More... | |
| uint16_t | atGetExecTime (ATCACommand cacmd, ATCA_CmdMap cmd) |
| return the typical execution type for the given command More... | |
| void | deleteATCACommand (ATCACommand *) |
| ATCACommand destructor. More... | |
| void | atCRC (size_t length, const uint8_t *data, uint8_t *crc_le) |
| Calculates CRC over the given raw data and returns the CRC in little-endian byte order. More... | |
| void | atCalcCrc (ATCAPacket *pkt) |
| This function calculates CRC and adds it to the correct offset in the packet data. More... | |
| uint8_t | atCheckCrc (const uint8_t *response) |
| This function checks the consistency of a response. More... | |
Definitions for the COUNTER Command | |
| #define | COUNTER_COUNT ATCA_CMD_SIZE_MIN |
| #define | COUNTER_MODE_IDX ATCA_PARAM1_IDX |
| COUNTER command index for mode. More... | |
| #define | COUNTER_KEYID_IDX ATCA_PARAM2_IDX |
| COUNTER command index for key id. More... | |
| #define | COUNTER_CHALLENGE_IDX ATCA_DATA_IDX |
| COUNTER command index for optional challenge. More... | |
| #define | COUNTER_COUNT_LONG (70) |
| COUNTER command packet size without challenge. More... | |
| #define | COUNTER_MODE_MASK ((uint8_t)0x01) |
| COUNTER mode bits 1 to 7 are 0. More... | |
| enum | enum_counter_mode { COUNTER_MODE_READ = 0, COUNTER_MODE_INCREASE = 1 } |
Atmel Crypto Auth device command object - this is a command builder only, it does not send the command. The result of a command method is a fully formed packet, ready to send to the ATCAIFace object to dispatch.
This command object supports the ATSHA and ATECC device family. The command list is a superset of all device commands for this family. The command object differentiates the packet contents based on specific device type within the family.
Copyright (c) 2015 Atmel Corporation. All rights reserved.
| #define ATCA_ADDRESS_MASK (0x007F) |
Address bit 7 to 15 are always 0.
| #define ATCA_ADDRESS_MASK_CONFIG (0x001F) |
Address bits 5 to 7 are 0 for Configuration zone.
| #define ATCA_ADDRESS_MASK_OTP (0x000F) |
Address bits 4 to 7 are 0 for OTP zone.
| #define ATCA_B283_KEY_TYPE 0 |
B283 NIST ECC key.
| #define ATCA_BLOCK_SIZE (32) |
size of a block
| #define ATCA_CHECKMAC ((uint8_t)0x28) |
CheckMac command op-code.
| #define ATCA_CMD_SIZE_MAX ((uint8_t)4 * 36 + 7) |
maximum size of command packet (Verify)
| #define ATCA_CMD_SIZE_MIN ((uint8_t)7) |
minimum number of bytes in command (from count byte to second CRC byte)
| #define ATCA_CONFIG_SIZE (128) |
size of configuration zone
| #define ATCA_COUNT_IDX (0) |
command packet index for count
| #define ATCA_COUNT_SIZE ((uint8_t)1) |
Number of bytes in the command packet Count.
| #define ATCA_COUNTER ((uint8_t)0x24) |
Counter command op-code.
| #define ATCA_CRC_SIZE ((uint8_t)2) |
Number of bytes in the command packet CRC.
| #define ATCA_DATA_IDX (5) |
command packet index for data load
| #define ATCA_DATA_SIZE (ATCA_KEY_COUNT * ATCA_KEY_SIZE) |
size of data zone
| #define ATCA_DERIVE_KEY ((uint8_t)0x1C) |
DeriveKey command op-code.
| #define ATCA_ECDH ((uint8_t)0x43) |
ECDH command op-code.
| #define ATCA_GENDIG ((uint8_t)0x15) |
GenDig command op-code.
| #define ATCA_GENKEY ((uint8_t)0x40) |
GenKey command op-code.
| #define ATCA_HMAC ((uint8_t)0x11) |
HMAC command op-code.
| #define ATCA_INFO ((uint8_t)0x30) |
Info command op-code.
| #define ATCA_K283_KEY_TYPE 1 |
K283 NIST ECC key.
| #define ATCA_KEY_COUNT (16) |
number of keys
| #define ATCA_KEY_ID_MAX ((uint8_t)15) |
maximum value for key id
| #define ATCA_KEY_SIZE (32) |
size of a symmetric SHA key
| #define ATCA_LOCK ((uint8_t)0x17) |
Lock command op-code.
| #define ATCA_LOCKED (0x00) |
Value indicating a locked zone.
| #define ATCA_MAC ((uint8_t)0x08) |
MAC command op-code.
| #define ATCA_NONCE ((uint8_t)0x16) |
Nonce command op-code.
| #define ATCA_OPCODE_IDX (1) |
command packet index for op-code
| #define ATCA_OTP_BLOCK_MAX ((uint8_t)1) |
maximum value for OTP block
| #define ATCA_OTP_SIZE (64) |
size of OTP zone
| #define ATCA_P256_KEY_TYPE 4 |
P256 NIST ECC key.
| #define ATCA_PACKET_OVERHEAD (ATCA_COUNT_SIZE + ATCA_CRC_SIZE) |
Number of bytes in the command packet.
| #define ATCA_PARAM1_IDX (2) |
command packet index for first parameter
| #define ATCA_PARAM2_IDX (3) |
command packet index for second parameter
| #define ATCA_PAUSE ((uint8_t)0x01) |
Pause command op-code.
| #define ATCA_PRIV_KEY_SIZE (32) |
size of a p256 private key
| #define ATCA_PRIVWRITE ((uint8_t)0x46) |
PrivWrite command op-code.
| #define ATCA_PUB_KEY_PAD (4) |
size of the public key pad
| #define ATCA_PUB_KEY_SIZE (64) |
size of a p256 public key
| #define ATCA_RANDOM ((uint8_t)0x1B) |
Random command op-code.
| #define ATCA_READ ((uint8_t)0x02) |
Read command op-code.
| #define ATCA_RSP_DATA_IDX (1) |
buffer index of data in response
| #define ATCA_RSP_SIZE_32 ((uint8_t)35) |
size of response packet containing 32 bytes data
| #define ATCA_RSP_SIZE_4 ((uint8_t)7) |
size of response packet containing 4 bytes data
| #define ATCA_RSP_SIZE_64 ((uint8_t)67) |
size of response packet containing 64 bytes data
| #define ATCA_RSP_SIZE_72 ((uint8_t)75) |
size of response packet containing 64 bytes data
| #define ATCA_RSP_SIZE_MAX ((uint8_t)75) |
maximum size of response packet (GenKey and Verify command)
| #define ATCA_RSP_SIZE_MIN ((uint8_t)4) |
minimum number of bytes in response
| #define ATCA_RSP_SIZE_VAL ((uint8_t)7) |
size of response packet containing four bytes of data
| #define ATCA_SERIAL_NUM_SIZE (9) |
number of bytes in the device serial number
| #define ATCA_SHA ((uint8_t)0x47) |
SHA command op-code.
| #define ATCA_SHA_CONFIG_SIZE (88) |
size of configuration zone
| #define ATCA_SHA_DIGEST_SIZE (32) |
| #define ATCA_SIG_SIZE (64) |
size of a p256 signature
| #define ATCA_SIGN ((uint8_t)0x41) |
Sign command op-code.
| #define ATCA_UNLOCKED (0x55) |
Value indicating an unlocked zone.
| #define ATCA_UPDATE_EXTRA ((uint8_t)0x20) |
UpdateExtra command op-code.
| #define ATCA_VERIFY ((uint8_t)0x45) |
GenKey command op-code.
| #define ATCA_WORD_SIZE (4) |
size of a word
| #define ATCA_WRITE ((uint8_t)0x12) |
Write command op-code.
| #define ATCA_ZONE_CONFIG ((uint8_t)0x00) |
Configuration zone.
| #define ATCA_ZONE_DATA ((uint8_t)0x02) |
Data zone.
| #define ATCA_ZONE_ENCRYPTED ((uint8_t)0x40) |
Zone bit 6 set: Write is encrypted with an unlocked data zone.
| #define ATCA_ZONE_MASK ((uint8_t)0x03) |
Zone mask.
| #define ATCA_ZONE_OTP ((uint8_t)0x01) |
OTP (One Time Programming) zone.
| #define ATCA_ZONE_READWRITE_32 ((uint8_t)0x80) |
Zone bit 7 set: Access 32 bytes, otherwise 4 bytes.
| #define CHECKMAC_CLIENT_CHALLENGE_IDX ATCA_DATA_IDX |
CheckMAC command index for client challenge.
| #define CHECKMAC_CLIENT_CHALLENGE_SIZE (32) |
CheckMAC size of client challenge.
| #define CHECKMAC_CLIENT_COMMAND_SIZE (4) |
CheckMAC size of client command header size inside "other data".
| #define CHECKMAC_CLIENT_RESPONSE_IDX (37) |
CheckMAC command index for client response.
| #define CHECKMAC_CLIENT_RESPONSE_SIZE (32) |
CheckMAC size of client response.
| #define CHECKMAC_CMD_MATCH (0) |
CheckMAC return value when there is a match.
| #define CHECKMAC_CMD_MISMATCH (1) |
CheckMAC return value when there is a mismatch.
| #define CHECKMAC_COUNT (84) |
CheckMAC command packet size.
| #define CHECKMAC_DATA_IDX (69) |
CheckMAC command index for other data.
| #define CHECKMAC_KEYID_IDX ATCA_PARAM2_IDX |
CheckMAC command index for key identifier.
| #define CHECKMAC_MODE_BLOCK1_TEMPKEY ((uint8_t)0x02) |
CheckMAC mode bit 1: first SHA block from TempKey.
| #define CHECKMAC_MODE_BLOCK2_TEMPKEY ((uint8_t)0x01) |
CheckMAC mode bit 0: second SHA block from TempKey.
| #define CHECKMAC_MODE_CHALLENGE ((uint8_t)0x00) |
CheckMAC mode 0: first SHA block from key id.
| #define CHECKMAC_MODE_IDX ATCA_PARAM1_IDX |
CheckMAC command index for mode.
| #define CHECKMAC_MODE_INCLUDE_OTP_64 ((uint8_t)0x20) |
CheckMAC mode bit 5: include first 64 OTP bits.
| #define CHECKMAC_MODE_MASK ((uint8_t)0x27) |
CheckMAC mode bits 3, 4, 6, and 7 are 0.
| #define CHECKMAC_MODE_SOURCE_FLAG_MATCH ((uint8_t)0x04) |
CheckMAC mode bit 2: match TempKey.SourceFlag.
| #define CHECKMAC_OTHER_DATA_SIZE (13) |
CheckMAC size of "other data".
| #define CHECKMAC_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of DeriveKey command
| #define CMD_STATUS_BYTE_COMM ((uint8_t)0xFF) |
communication error
| #define CMD_STATUS_BYTE_ECC ((uint8_t)0x05) |
command ECC error
| #define CMD_STATUS_BYTE_EXEC ((uint8_t)0x0F) |
command execution error
| #define CMD_STATUS_BYTE_PARSE ((uint8_t)0x03) |
command parse error
| #define CMD_STATUS_SUCCESS ((uint8_t)0x00) |
status byte for success
| #define CMD_STATUS_WAKEUP ((uint8_t)0x11) |
status byte after wake-up
| #define COUNTER_CHALLENGE_IDX ATCA_DATA_IDX |
COUNTER command index for optional challenge.
| #define COUNTER_COUNT ATCA_CMD_SIZE_MIN |
| #define COUNTER_COUNT_LONG (70) |
COUNTER command packet size without challenge.
| #define COUNTER_KEYID_IDX ATCA_PARAM2_IDX |
COUNTER command index for key id.
| #define COUNTER_MODE_IDX ATCA_PARAM1_IDX |
COUNTER command index for mode.
| #define COUNTER_MODE_MASK ((uint8_t)0x01) |
COUNTER mode bits 1 to 7 are 0.
| #define COUNTER_RSP_SIZE ATCA_RSP_SIZE_4 |
response size of COUNTER command
| #define DERIVE_KEY_COUNT_LARGE (39) |
DeriveKey command packet size with MAC.
| #define DERIVE_KEY_COUNT_SMALL ATCA_CMD_SIZE_MIN |
DeriveKey command packet size without MAC.
| #define DERIVE_KEY_MAC_IDX ATCA_DATA_IDX |
DeriveKey command index for optional MAC.
| #define DERIVE_KEY_MAC_SIZE (32) |
DeriveKey MAC size.
| #define DERIVE_KEY_RANDOM_FLAG ((uint8_t)4) |
DeriveKey 1. parameter; has to match TempKey.SourceFlag.
| #define DERIVE_KEY_RANDOM_IDX ATCA_PARAM1_IDX |
DeriveKey command index for random bit.
| #define DERIVE_KEY_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of DeriveKey command
| #define DERIVE_KEY_TARGETKEY_IDX ATCA_PARAM2_IDX |
DeriveKey command index for target slot.
| #define ECDH_COUNT (71) |
| #define ECDH_KEY_SIZE ATCA_BLOCK_SIZE |
response size of ECDH command
| #define ECDH_PREFIX_MODE ((uint8_t)0x00) |
| #define ECDH_PUBKEYIN_SIZE (64) |
| #define ECDH_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of ECDH command
| #define GENDIG_COUNT ATCA_CMD_SIZE_MIN |
GenDig command packet size without "other data".
| #define GENDIG_DATA_IDX ATCA_DATA_IDX |
GenDig command index for optional data.
| #define GENDIG_KEYID_IDX ATCA_PARAM2_IDX |
GenDig command index for key id.
| #define GENDIG_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of GenDig command
| #define GENDIG_ZONE_CONFIG ((uint8_t)0) |
GenDig zone id config. Use KeyID to specify any of the four 256-bit blocks of the Configuration zone.
| #define GENDIG_ZONE_COUNTER ((uint8_t)4) |
GenDig zone id counter. KeyID specifies the monotonic counter ID to be included in the message generation.
| #define GENDIG_ZONE_DATA ((uint8_t)2) |
GenDig zone id data. Use KeyID to specify a slot in the Data zone or a transport key in the hardware array.
| #define GENDIG_ZONE_IDX ATCA_PARAM1_IDX |
GenDig command index for zone.
| #define GENDIG_ZONE_KEY_CONFIG ((uint8_t)5) |
GenDig zone id key config. KeyID specifies the slot for which the configuration information is to be included in the message generation.
| #define GENDIG_ZONE_OTP ((uint8_t)1) |
GenDig zone id OTP. Use KeyID to specify either the first or second 256-bit block of the OTP zone.
| #define GENDIG_ZONE_SHARED_NONCE ((uint8_t)3) |
GenDig zone id shared nonce. KeyID specifies the location of the input value in the message generation.
| #define GENKEY_COUNT ATCA_CMD_SIZE_MIN |
GenKey command packet size without "other data".
| #define GENKEY_COUNT_DATA (10) |
GenKey command packet size with "other data".
| #define GENKEY_DATA_IDX (5) |
GenKey command index for other data.
| #define GENKEY_KEYID_IDX ATCA_PARAM2_IDX |
GenKey command index for key id.
| #define GENKEY_MODE_DIGEST ((uint8_t)0x08) |
GenKey mode: PubKey digest will be created after the public key is calculated.
| #define GENKEY_MODE_IDX ATCA_PARAM1_IDX |
GenKey command index for mode.
| #define GENKEY_MODE_MASK ((uint8_t)0x1C) |
GenKey mode bits 0 to 1 and 5 to 7 are 0.
| #define GENKEY_MODE_PRIVATE ((uint8_t)0x04) |
GenKey mode: private key generation.
| #define GENKEY_MODE_PUBKEY_DIGEST ((uint8_t)0x10) |
GenKey mode: Calculate PubKey digest on the public key in KeyId.
| #define GENKEY_MODE_PUBLIC ((uint8_t)0x00) |
GenKey mode: public key calculation.
| #define GENKEY_OTHER_DATA_SIZE (3) |
GenKey size of "other data".
| #define GENKEY_RSP_SIZE_LONG ATCA_RSP_SIZE_72 |
response size of GenKey command when generating key
| #define GENKEY_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
response size of GenKey command in Digest mode
| #define HMAC_COUNT ATCA_CMD_SIZE_MIN |
HMAC command packet size.
| #define HMAC_DIGEST_SIZE (32) |
HMAC size of digest response.
| #define HMAC_KEYID_IDX ATCA_PARAM2_IDX |
HMAC command index for key id.
| #define HMAC_MODE_FLAG_FULLSN ((uint8_t)0x40) |
HMAC mode bit 6: If set, include the 48 bits SN[2:3] and SN[4:7] in the message.; otherwise, the corresponding message bits are set to zero.
| #define HMAC_MODE_FLAG_OTP64 ((uint8_t)0x20) |
HMAC mode bit 5: Include the first 64 OTP bits (OTP[0] through OTP[7]) in the message.; otherwise, the corresponding message bits are set to zero. If Mode[4] is set, the value of this mode bit is ignored. Not applicable for ATECC508A.
| #define HMAC_MODE_FLAG_OTP88 ((uint8_t)0x10) |
HMAC mode bit 4: Include the first 88 OTP bits (OTP[0] through OTP[10]) in the message.; otherwise, the corresponding message bits are set to zero. Not applicable for ATECC508A.
| #define HMAC_MODE_FLAG_TK_NORAND ((uint8_t)0x04) |
HMAC mode bit 2: The value of this bit must match the value in TempKey.SourceFlag or the command will return an error.
| #define HMAC_MODE_FLAG_TK_RAND ((uint8_t)0x00) |
HMAC mode bit 2: The value of this bit must match the value in TempKey.SourceFlag or the command will return an error.
| #define HMAC_MODE_IDX ATCA_PARAM1_IDX |
HMAC command index for mode.
| #define HMAC_MODE_MASK ((uint8_t)0x74) |
HMAC mode bits 0, 1, 3, and 7 are 0.
| #define HMAC_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of HMAC command
| #define INFO_COUNT ATCA_CMD_SIZE_MIN |
Info command packet size.
| #define INFO_DRIVER_STATE_MASK ((uint8_t)0x02) |
Info driver state mask.
| #define INFO_MODE_GPIO ((uint8_t)0x03) |
Info mode GPIO.
| #define INFO_MODE_KEY_VALID ((uint8_t)0x01) |
Info mode KeyValid.
| #define INFO_MODE_MAX ((uint8_t)0x03) |
Info mode maximum value.
| #define INFO_MODE_REVISION ((uint8_t)0x00) |
Info mode Revision.
| #define INFO_MODE_STATE ((uint8_t)0x02) |
Info mode State.
| #define INFO_NO_STATE ((uint8_t)0x00) |
Info mode is not the state mode.
| #define INFO_OUTPUT_STATE_MASK ((uint8_t)0x01) |
Info output state mask.
| #define INFO_PARAM1_IDX ATCA_PARAM1_IDX |
Info command index for 1. parameter.
| #define INFO_PARAM2_IDX ATCA_PARAM2_IDX |
Info command index for 2. parameter.
| #define INFO_PARAM2_MAX ((uint8_t)0x03) |
Info param2 (state) maximum value.
| #define INFO_RSP_SIZE ATCA_RSP_SIZE_VAL |
response size of Info command returns 4 bytes
| #define INFO_SIZE ((uint8_t)0x04) |
Info param2 (state) maximum value.
| #define LOCK_COUNT ATCA_CMD_SIZE_MIN |
Lock command packet size.
| #define LOCK_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of Lock command
| #define LOCK_SUMMARY_IDX ATCA_PARAM2_IDX |
Lock command index for summary.
| #define LOCK_ZONE_CONFIG ((uint8_t)0x00) |
Lock zone is Config.
| #define LOCK_ZONE_DATA ((uint8_t)0x01) |
Lock zone is OTP or Data.
| #define LOCK_ZONE_DATA_SLOT ((uint8_t)0x02) |
Lock slot of Data.
| #define LOCK_ZONE_IDX ATCA_PARAM1_IDX |
Lock command index for zone.
| #define LOCK_ZONE_MASK (0xBF) |
Lock parameter 1 bits 6 are 0.
| #define LOCK_ZONE_NO_CRC ((uint8_t)0x80) |
Lock command: Ignore summary.
| #define MAC_CHALLENGE_IDX ATCA_DATA_IDX |
MAC command index for optional challenge.
| #define MAC_CHALLENGE_SIZE (32) |
MAC size of challenge.
| #define MAC_COUNT_LONG (39) |
MAC command packet size with challenge.
| #define MAC_COUNT_SHORT ATCA_CMD_SIZE_MIN |
MAC command packet size without challenge.
| #define MAC_KEYID_IDX ATCA_PARAM2_IDX |
MAC command index for key id.
| #define MAC_MODE_BLOCK1_TEMPKEY ((uint8_t)0x02) |
MAC mode bit 1: first SHA block from TempKey.
| #define MAC_MODE_BLOCK2_TEMPKEY ((uint8_t)0x01) |
MAC mode bit 0: second SHA block from TempKey.
| #define MAC_MODE_CHALLENGE ((uint8_t)0x00) |
MAC mode 0: first SHA block from data slot.
| #define MAC_MODE_IDX ATCA_PARAM1_IDX |
MAC command index for mode.
| #define MAC_MODE_INCLUDE_OTP_64 ((uint8_t)0x20) |
MAC mode bit 5: include first 64 OTP bits.
| #define MAC_MODE_INCLUDE_OTP_88 ((uint8_t)0x10) |
MAC mode bit 4: include first 88 OTP bits.
| #define MAC_MODE_INCLUDE_SN ((uint8_t)0x40) |
MAC mode bit 6: include serial number.
| #define MAC_MODE_MASK ((uint8_t)0x77) |
MAC mode bits 3 and 7 are 0.
| #define MAC_MODE_PASSTHROUGH ((uint8_t)0x07) |
MAC mode bit 0-2: pass-through mode.
| #define MAC_MODE_PTNONCE_TEMPKEY ((uint8_t)0x06) |
MAC mode bit 0: second SHA block from TempKey.
| #define MAC_MODE_SOURCE_FLAG_MATCH ((uint8_t)0x04) |
MAC mode bit 2: match TempKey.SourceFlag.
| #define MAC_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of MAC command
| #define MAC_SIZE (32) |
MAC size of response.
| #define NONCE_COUNT_LONG (39) |
Nonce command packet size for 32 bytes of data.
| #define NONCE_COUNT_SHORT (27) |
Nonce command packet size for 20 bytes of data.
| #define NONCE_INPUT_IDX ATCA_DATA_IDX |
Nonce command index for input data.
| #define NONCE_MODE_IDX ATCA_PARAM1_IDX |
Nonce command index for mode.
| #define NONCE_MODE_INVALID ((uint8_t)0x02) |
Nonce mode 2 is invalid.
| #define NONCE_MODE_MASK ((uint8_t)0x03) |
Nonce mode bits 2 to 7 are 0.
| #define NONCE_MODE_NO_SEED_UPDATE ((uint8_t)0x01) |
Nonce mode: do not update seed.
| #define NONCE_MODE_PASSTHROUGH ((uint8_t)0x03) |
Nonce mode: pass-through.
| #define NONCE_MODE_RANDOM_OUT ((uint16_t)0x0000) |
Nonce mode: output RandOut or single byte of zero.
| #define NONCE_MODE_SEED_UPDATE ((uint8_t)0x00) |
Nonce mode: update seed.
| #define NONCE_MODE_TEMPKEY_OUT ((uint16_t)0x0080) |
Nonce mode: output RandOut or single byte of zero.
| #define NONCE_NUMIN_SIZE (20) |
Nonce data length.
| #define NONCE_NUMIN_SIZE_PASSTHROUGH (32) |
Nonce data length in pass-through mode (mode = 3)
| #define NONCE_PARAM2_IDX ATCA_PARAM2_IDX |
Nonce command index for 2. parameter.
| #define NONCE_RSP_SIZE_LONG ATCA_RSP_SIZE_32 |
response size of Nonce command
| #define NONCE_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
response size of Nonce command with mode[0:1] = 3
| #define PAUSE_COUNT ATCA_CMD_SIZE_MIN |
Pause command packet size.
| #define PAUSE_PARAM2_IDX ATCA_PARAM2_IDX |
Pause command index for 2. parameter.
| #define PAUSE_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of Pause command
| #define PAUSE_SELECT_IDX ATCA_PARAM1_IDX |
Pause command index for Selector.
| #define PRIVWRITE_COUNT (75) |
PrivWrite command packet size.
| #define PRIVWRITE_KEYID_IDX ATCA_PARAM2_IDX |
PrivWrite command index for KeyID.
| #define PRIVWRITE_MAC_IDX (41) |
PrivWrite command index for MAC.
| #define PRIVWRITE_MODE_ENCRYPT ((uint8_t)0x40) |
PrivWrite mode: encrypted.
| #define PRIVWRITE_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of PrivWrite command
| #define PRIVWRITE_VALUE_IDX ( 5) |
PrivWrite command index for value.
| #define PRIVWRITE_ZONE_IDX ATCA_PARAM1_IDX |
PrivWrite command index for zone.
| #define PRIVWRITE_ZONE_MASK ((uint8_t)0x40) |
PrivWrite zone bits 0 to 5 and 7 are 0.
| #define RANDOM_COUNT ATCA_CMD_SIZE_MIN |
Random command packet size.
| #define RANDOM_MODE_IDX ATCA_PARAM1_IDX |
Random command index for mode.
| #define RANDOM_NO_SEED_UPDATE ((uint8_t)0x01) |
Random mode for no seed update.
| #define RANDOM_NUM_SIZE ((uint8_t)0x20) |
Number of bytes in the data packet of a random command.
| #define RANDOM_PARAM2_IDX ATCA_PARAM2_IDX |
Random command index for 2. parameter.
| #define RANDOM_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of Random command
| #define RANDOM_SEED_UPDATE ((uint8_t)0x00) |
Random mode for automatic seed update.
| #define READ_32_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of Read command when reading 32 bytes
| #define READ_4_RSP_SIZE ATCA_RSP_SIZE_VAL |
response size of Read command when reading 4 bytes
| #define READ_ADDR_IDX ATCA_PARAM2_IDX |
Read command index for address.
| #define READ_COUNT ATCA_CMD_SIZE_MIN |
Read command packet size.
| #define READ_ZONE_IDX ATCA_PARAM1_IDX |
Read command index for zone.
| #define READ_ZONE_MASK ((uint8_t)0x83) |
Read zone bits 2 to 6 are 0.
| #define RSA2048_KEY_SIZE (256) |
size of a RSA private key
| #define SHA_BLOCK_SIZE (64) |
| #define SHA_COUNT_LONG (7) |
| #define SHA_COUNT_SHORT ATCA_CMD_SIZE_MIN |
| #define SHA_DATA_MAX (64) |
| #define SHA_MODE_HMAC_END ((uint8_t)0x05) |
Complete the HMAC computation and return digest.
| #define SHA_MODE_HMAC_START ((uint8_t)0x04) |
Initialization, HMAC calculation.
| #define SHA_MODE_HMAC_UPDATE ((uint8_t)0x01) |
Add 64 bytes in the meesage to the SHA context.
| #define SHA_MODE_SHA256_END ((uint8_t)0x02) |
Complete the calculation and return the digest.
| #define SHA_MODE_SHA256_PUBLIC ((uint8_t)0x03) |
Add 64 byte ECC public key in the slot to the SHA context.
| #define SHA_MODE_SHA256_START ((uint8_t)0x00) |
Initialization, does not accept a message.
| #define SHA_MODE_SHA256_UPDATE ((uint8_t)0x01) |
Add 64 bytes in the meesage to the SHA context.
| #define SHA_RSP_SIZE ATCA_RSP_SIZE_32 |
response size of SHA command
| #define SHA_RSP_SIZE_LONG ATCA_RSP_SIZE_32 |
response size of SHA command
| #define SHA_RSP_SIZE_SHORT ATCA_RSP_SIZE_MIN |
response size of SHA command
| #define SIGN_COUNT ATCA_CMD_SIZE_MIN |
Sign command packet size.
| #define SIGN_KEYID_IDX ATCA_PARAM2_IDX |
Sign command index for key id.
| #define SIGN_MODE_EXTERNAL ((uint8_t)0x80) |
Sign mode bit 7: external.
| #define SIGN_MODE_IDX ATCA_PARAM1_IDX |
Sign command index for mode.
| #define SIGN_MODE_INCLUDE_SN ((uint8_t)0x40) |
Sign mode bit 6: include serial number.
| #define SIGN_MODE_INTERNAL ((uint8_t)0x00) |
Sign mode 0: internal.
| #define SIGN_MODE_INVALIDATE ((uint8_t)0x01) |
Sign mode bit 1: Signature will be used for Verify(Invalidate)
| #define SIGN_MODE_MASK ((uint8_t)0xC0) |
Sign mode bits 0 to 5 are 0.
| #define SIGN_RSP_SIZE ATCA_RSP_SIZE_MAX |
response size of Sign command
| #define UPDATE_COUNT ATCA_CMD_SIZE_MIN |
UpdateExtra command packet size.
| #define UPDATE_MODE_DEC_COUNTER ((uint8_t)0x02) |
UpdateExtra mode: decrement counter.
| #define UPDATE_MODE_IDX ATCA_PARAM1_IDX |
UpdateExtra command index for mode.
| #define UPDATE_MODE_SELECTOR ((uint8_t)0x01) |
UpdateExtra mode: update Config byte 85 (selector)
| #define UPDATE_MODE_USER_EXTRA ((uint8_t)0x00) |
UpdateExtra mode: update Config byte 84 (user extra)
| #define UPDATE_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of UpdateExtra command
| #define UPDATE_VALUE_IDX ATCA_PARAM2_IDX |
UpdateExtra command index for new value.
| #define VERIFY_256_EXTERNAL_COUNT (135) |
Verify command packet size for 256-bit key in external mode.
| #define VERIFY_256_KEY_SIZE ( 64) |
Verify key size for 256-bit key.
| #define VERIFY_256_SIGNATURE_SIZE ( 64) |
Verify signature size for 256-bit key.
| #define VERIFY_256_STORED_COUNT ( 71) |
Verify command packet size for 256-bit key in stored mode.
| #define VERIFY_256_VALIDATE_COUNT ( 90) |
Verify command packet size for 256-bit key in validate mode.
| #define VERIFY_283_EXTERNAL_COUNT (151) |
Verify command packet size for 283-bit key in external mode.
| #define VERIFY_283_KEY_SIZE ( 72) |
Verify key size for 283-bit key.
| #define VERIFY_283_SIGNATURE_SIZE ( 72) |
Verify signature size for 283-bit key.
| #define VERIFY_283_STORED_COUNT ( 79) |
Verify command packet size for 283-bit key in stored mode.
| #define VERIFY_283_VALIDATE_COUNT ( 98) |
Verify command packet size for 283-bit key in validate mode.
| #define VERIFY_DATA_IDX ( 5) |
Verify command index for data.
| #define VERIFY_KEY_B283 ((uint16_t)0x0000) |
Verify key type: B283.
| #define VERIFY_KEY_K283 ((uint16_t)0x0001) |
Verify key type: K283.
| #define VERIFY_KEY_P256 ((uint16_t)0x0004) |
Verify key type: P256.
| #define VERIFY_KEYID_IDX ATCA_PARAM2_IDX |
Verify command index for key id.
| #define VERIFY_MODE_EXTERNAL ((uint8_t)0x02) |
Verify mode: external.
| #define VERIFY_MODE_IDX ATCA_PARAM1_IDX |
Verify command index for mode.
| #define VERIFY_MODE_INVALIDATE ((uint8_t)0x07) |
Verify mode: invalidate.
| #define VERIFY_MODE_MASK ((uint8_t)0x03) |
Verify mode bits 2 to 7 are 0.
| #define VERIFY_MODE_STORED ((uint8_t)0x00) |
Verify mode: stored.
| #define VERIFY_MODE_VALIDATE ((uint8_t)0x03) |
Verify mode: validate.
| #define VERIFY_MODE_VALIDATE_EXTERNAL ((uint8_t)0x01) |
Verify mode: validate external.
| #define VERIFY_OTHER_DATA_SIZE ( 19) |
Verify size of "other data".
| #define VERIFY_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of UpdateExtra command
| #define WRITE_ADDR_IDX ATCA_PARAM2_IDX |
Write command index for address.
| #define WRITE_MAC_SIZE (32) |
Write MAC size.
| #define WRITE_MAC_VL_IDX (37) |
Write command index for MAC following long data.
| #define WRITE_MAC_VS_IDX ( 9) |
Write command index for MAC following short data.
| #define WRITE_RSP_SIZE ATCA_RSP_SIZE_MIN |
response size of Write command
| #define WRITE_VALUE_IDX ATCA_DATA_IDX |
Write command index for data.
| #define WRITE_ZONE_DATA ((uint8_t)2) |
WRITE zone id data.
| #define WRITE_ZONE_IDX ATCA_PARAM1_IDX |
Write command index for zone.
| #define WRITE_ZONE_MASK ((uint8_t)0xC3) |
Write zone bits 2 to 5 are 0.
| #define WRITE_ZONE_OTP ((uint8_t)1) |
WRITE zone id OTP.
| #define WRITE_ZONE_WITH_MAC ((uint8_t)0x40) |
Write zone bit 6: write encrypted with MAC.
| typedef struct atca_command* ATCACommand |
| enum ATCA_CmdMap |
| enum enum_counter_mode |


SquashR
About Us
SquashR is designed to enhance and simplify the experience of bug catching for software development teams. Our interface makes it easy to log and assign specific bugs to your development teams. The streamlined approach that we take with SquashR is the key to catching and fixing software bugs in a timely manner. This allows the companies that utilize SquashR to spend more time on development and deployment, and less time on logistics.


Favourites
Fave Everything
- Fave Movie= Logan
- Fave Series= Fargo
- Fave Football Team= Chelsea
- Fave Food= Mama Rock's Burgers
- Fave Anime= Gintama
- Fave Game= Apex Legends
- Fave Books= His Dark Materials
- Fave Exercise= Deadlifts
Fave Moringa TM= Abdirahman
- Fave colour= Orange


{{pf1}} {{pf2}} {{pf3}} {{pf4}} {{pf5}} {{wrong_key_provided_with_curly_bracket}} {{wrong key consisted with several words with curly bracket}}


Setting Up a GoDaddy Domain Name with Amazon Web Services
One day, I decided I wanted to start a website. So then… now what? The following post describes the steps I took to purchase a domain name and get it set up with Amazon’s web hosting services.
Step 1: Register for a domain name
Go to GoDaddy and purchase a domain name (e.g. mycowsworld.com)
This reserves a name that people will use to access your website. Now, you’ll need a place to store the files for your website.
Step 2: Sign up for Amazon Web Services (AWS)
Go to Amazon Web Services and sign up for an account.
Amazon has some nice services for cloud computing. One of these services can be used for website hosting (Amazon S3). AWS costs are scaled based on usage (i.e. how much data you store on their servers). My current costs are about 50 cents/month to host this blog.
Step 3: Setup Amazon S3 (Simple Storage Service)
Amazon S3 is an online data storage service, which is part of the AWS suite of tools. In S3, you create “buckets” that will be used to store data. Each bucket can be configured individually, such as changing who has permissions to access a particular bucket.
In this case, we’ll create two buckets: one for “mywebsite.com” and the other for “www.mywebsite.com”. We’ll configure it so that the content will be stored in mywebsite.com and that requests for www.mywebsite.com will be redirected to mywebsite.com.
- Click My Account / Console on the top-right of the window and select AWS Management Console
- Click Services at the top-left of the window and select S3
- Create two buckets: mywebsite.com and www.mywebsite.com. Follow these instructions to create a bucket (http://docs.aws.amazon.com/AmazonS3/latest/UG/CreatingaBucket.html).
Upload files to the mywebsite.com bucket
- Click the mywebsite.com bucket
- Click Upload at the top-left of the screen
- Click Add Files on the pop-up that appears and select the various website files. Multiple files can be selected. (If you do not have website files, you can create a test file with the following code)
- Click Start Upload to upload the files to the bucket
Configure bucket permissions to make it accessible to public
- Click Properties at the top-right of the screen
- Click Permissions
- Click Edit Bucket Policy
- Add the following to the text box (note: make sure you replace www.mywebsite.com with your own domain name)
- Click Save on the pop-up window
- Click Save in the *Permissions* pane
Configure bucket for website hosting
- In the Properties pane, select Static Website Hosting
- Select Enable website hosting
- For Index Document, enter in the filename that will be used as the home page for your website. Typically this is index.html (make sure this file is uploaded to the bucket!)
- Click Save in the Static Website Hosting pane
- To test, click the Endpoint URL shown in the Static Website Hosting pane and see if your website loads.
Redirect www.mywebsite.com requests to mywebsite.com
- Click All Buckets on the top left of the page
- Click the www.mywebsite.com bucket
- Click Properties on the top-right
- Click Static Website Hosting
- Select Redirect all requests to another host name
- Type mywebsite.com in the Redirect all requests to field
- Click Save
- To test, click the Endpoint URL shown in the Static Website Hosting pane and see if your website loads.
Step 4: Setup Amazon Route 53
Amazon Route 53 will be used to link the domain name you purchased to the buckets you just created.
- Click Services at the top-left of the window and select Route 53
- Click Create Hosted Zone near the top of the screen
- On the right side of the screen, enter your domain name (e.g. mywebsite.com)
- Click Create Hosted Zone at the bottom of the panel (After you create a hosted zone, it should appear in the main panel with a check mark)
- Click Go to Record Sets near the top of the screen
Create the “A” Record
The “A” Record will point mywebsite.com to the S3 bucket
- Click Create Record Set
- Change Type to A - IPv4 address
- Change Alias to Yes
- Click the Alias Target field and select mywebsite.com (s3-website-*)
- Click Create Record Set
Create the “CNAME” Record
The “CNAME” Record will redirect www.mywebsite.com requests to mywebsite.com
- Click Create Record Set
- In the Name field, add www. before mywebsite.com
- Change Type to CNAME
- Change Alias to No
- In Value, enter in mywebsite.com
- Click Create Record Set
Step 5: Configure the DNS provider (GoDaddy) to use Amazon Route 53 Name Servers
As the DNS provider, you will need to tell GoDaddy to update the Domain Name Servers to point to the Amazon Name Servers.
- In the Record Sets page, note the 4 addresses in the “NS” entry (e.g. ns-123.awsdns-55.net)
- Log in to GoDaddy.com
- Click My Account at the top of the screen
- In the DOMAINS pane, click Launch
- Click on the Domain Name that you want to edit
- In the Nameservers section, select Set Nameservers
- Select I have specific nameservers for my domains
- Set the nameservers to the ones noted in the “NS” entry in Step 5.1 (you can omit the ending period)
Tip from Kelton Manzanares: Make sure you delete the default CNAME record in Godaddy for www for your www. domain to work.
Step 6: Test your website
Try entering your domain name into your web browser. Both mywebsite.com and www.mywebsite.com should work! Note that it may take some time (up to several hours) before these settings are propagated to the various servers on the internet.
What is happening?
The following image helps describe the process when a user enters an address into the web browser.
- There are 13 Root Name Servers spread across the world. These servers parse the request for the top level domain (e.g. .com, .net, etc) and pass to the appropriate server
- Authoritative Name Servers are defined in the Domain Name manager (e.g. GoDaddy.com). We defined the Name Servers to point to the ones provided by Amazon Route 53
- In Amazon Route 53, we defined the A record to return the IP address of one of the S3 buckets that was created
- DNS records have a “TTL” (time-to-live) setting which tells the ISP Name server how long it can hold a record before needing to get a new copy in case of changes.
References
Configuring AWS and GoDaddy settings
- http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html
- http://steveliles.github.io/pointing_a_domain_name_to_an_amazon_s3_bucket.html
- http://support.godaddy.com/groups/web-hosting/forum/topic/using-amazon-s3-with-godaddy-registered-domain/?pc_split_value=1
DNS – How does it work?
- http://www.mygreatname.com/how-dns-works/e-04-how-dns-works.htm
- http://dyn.com/blog/dns-why-its-important-how-it-works/


This is not an ActiveRecord subclass.
Boilerplate code for Rails
# File app/models/timesheet_force_commit.rb, line 73 def initialize( attributes = {} ) attributes ||= {} attributes.each do | name, value | send( "#{name}=", value ) end end
We use a private coerce-to-date function rather than Rails' built in “#to_date” because of the latter's bizarre behaviour when faced with invalid strings (user-meaningless exceptions arising from the internal implementation, rather than Ruby's “invalid date”).
The values used for limits end up always coerced to dates, while the user-specified “earliest” and “latest” are left to whatever the user set. That way, re-rendering a form complaining about e.g. an invalid date will make sense by presenting the user-set data, not parsed or cleared-out variation of it.
# File app/models/timesheet_force_commit.rb, line 39 def earliest_limit=( value ) @earliest_limit = to_date( value ) end
Neither NilClass (annoyingly) or Date (sensibly) provide “empty?” but we want to detect both empty strings, or true nil, while still allowing Date instances. So pass a value and get true/false if it is, or is not, effectively empty.
# File app/models/timesheet_force_commit.rb, line 56 def effectively_empty( value ) value.nil? || value.to_s.empty? end
# File app/models/timesheet_force_commit.rb, line 43 def latest_limit=( value ) @latest_limit = to_date( value ) end
# File app/models/timesheet_force_commit.rb, line 80 def persisted? false end
Pass a Date, DateTime, Time, string etc. and have it parsed to a Date. Returns the result (or throws an exception). If the value given is effectively empty (e.g. nil, empty string) then the method returns 'nil'.
# File app/models/timesheet_force_commit.rb, line 65 def to_date( value ) effectively_empty( value ) ? nil : Date.parse( value.to_s ) end


Estimation of transition probabilities for the illness-death model. Both the Aalen-Johansen estimator for a Markov model and a novel non-Markovian estimator by de Una-Alvarez and Meira-Machado (2015) <doi:10.1111/biom.12288>, see also Balboa and de Una-Alvarez (2018) <doi:10.18637/jss.v083.i10>, are included.
| Version: | 1.5 |
| Depends: | R (≥ 3.1.1), graphics, stats |
| Published: | 2018-04-18 |
| Author: | Vanesa Balboa-Barreiro, Jacobo de Una-Alvarez and Luis Meira-Machado |
| Maintainer: | Vanesa Balboa-Barreiro <vanesa.balboa at uvigo.es> |
| License: | GPL-2 |
| NeedsCompilation: | yes |
| Citation: | TP.idm citation info |
| In views: | Survival |
| CRAN checks: | TP.idm results |
| Reference manual: | TP.idm.pdf |
| Package source: | TP.idm_1.5.tar.gz |
| Windows binaries: | r-devel: TP.idm_1.5.zip, r-release: TP.idm_1.5.zip, r-oldrel: TP.idm_1.5.zip |
| OS X binaries: | r-release: TP.idm_1.5.tgz, r-oldrel: TP.idm_1.5.tgz |
| Old sources: | TP.idm archive |
Please use the canonical form https://CRAN.R-project.org/package=TP.idm to link to this page.


diff_classifier.msd
¶
diff_classifier.msd
¶
-
diff_classifier.msd.
all_msds
(data)[source]¶ Returns numpy array containing MSD data of all tracks in a trajectory pandas dataframe.
- data : pandas dataframe
- Contains, at a minimum a ‘Frame’, ‘Track_ID’, ‘X’, and ‘Y’ column. Note: it is assumed that frames begins at 1, not 0 with this function. Adjust before feeding into function.
- new_data: pandas dataframe
- Similar to input data. All missing frames of individual trajectories are filled in with NaNs, and two new columns, MSDs and Gauss are added: MSDs, calculated mean squared displacements using the formula MSD = <(x-x0)**2> Gauss, calculated Gaussianity
>>> d = {'Frame': [1, 2, 3, 4, 5, 1, 2, 3, 4, 5], 'Track_ID': [1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'X': [5, 6, 7, 8, 9, 1, 2, 3, 4, 5], 'Y': [6, 7, 8, 9, 10, 2, 3, 4, 5, 6]} >>> df = pd.DataFrame(data=d) >>> all_msds(df)
-
diff_classifier.msd.
all_msds2
(data, frames=651)[source]¶ Returns numpy array containing MSD data of all tracks in a trajectory pandas dataframe.
- data : pandas dataframe
- Contains, at a minimum a ‘Frame’, ‘Track_ID’, ‘X’, and ‘Y’ column. Note: it is assumed that frames begins at 0.
- new_data: pandas dataframe
- Similar to input data. All missing frames of individual trajectories are filled in with NaNs, and two new columns, MSDs and Gauss are added: MSDs, calculated mean squared displacements using the formula MSD = <(x-x0)**2> Gauss, calculated Gaussianity
- >>>> d = {‘Frame’: [0, 1, 2, 3, 4, 0, 1, 2, 3, 4],
- ‘Track_ID’: [1, 1, 1, 1, 1, 2, 2, 2, 2, 2], ‘X’: [5, 6, 7, 8, 9, 1, 2, 3, 4, 5], ‘Y’: [6, 7, 8, 9, 10, 2, 3, 4, 5, 6]}
>>>> df = pd.DataFrame(data=d) >>>> cols = [‘Frame’, ‘Track_ID’, ‘X’, ‘Y’, ‘MSDs’, ‘Gauss’] >>>> length = max(df[‘Frame’]) + 1 >>>> msd.all_msds2(df, frames=length)[cols]
-
diff_classifier.msd.
make_xyarray
(data, length=651)[source]¶ Rearranges xy data from input pandas dataframe into 2D numpy array.
- data : pandas dataframe
- Contains, at a minimum a ‘Frame’, ‘Track_ID’, ‘X’, and ‘Y’ column.
- length: int
- Desired length or number of frames to which to extend trajectories. Any trajectories shorter than the input length will have the extra space filled in with NaNs.
- f_array: numpy array of floats of size length x particles
- Contains frames data
- t_array: numpy array of floats of size length x particles
- Contains trajectory ID data
- x_array: numpy array of floats of size length x particles
- Contains x coordinate data
- y_array: numpy array of floats of size length x particles
- Contains y coordinate data
- >>>> d = {‘Frame’: [0, 1, 2, 3, 4, 2, 3, 4, 5, 6],
- ‘Track_ID’: [1, 1, 1, 1, 1, 2, 2, 2, 2, 2], ‘X’: [5, 6, 7, 8, 9, 1, 2, 3, 4, 5], ‘Y’: [6, 7, 8, 9, 10, 2, 3, 4, 5, 6]}
>>>> df = pd.DataFrame(data=d) >>>> length = max(df[‘Frame’]) + 1 >>>> f_array, t_array, x_array, y_array = msd.make_xyarray(df, length=length)
- (array([[0., 0.],
- [1., 1.], [2., 2.], [3., 3.], [4., 4.], [5., 5.], [6., 6.]]), array([[1., 2.], [1., 2.], [1., 2.], [1., 2.], [1., 2.], [1., 2.], [1., 2.]]), array([[ 5., nan], [ 6., nan], [ 7., 1.], [ 8., 2.], [ 9., 3.], [nan, 4.], [nan, 5.]]), array([[ 6., nan], [ 7., nan], [ 8., 2.], [ 9., 3.], [10., 4.], [nan, 5.], [nan, 6.]]))
-
diff_classifier.msd.
msd_calc
(track, length=10)[source]¶ msdcalc(track = pdarray)
Returns numpy array containing MSD data calculated from an individual track.
- track : pandas dataframe
- Contains, at a minimum a ‘Frame’, ‘X’, and ‘Y’ column
- new_track: pandas dataframe
- Similar to input track. All missing frames of individual trajectories are filled in with NaNs, and two new columns, MSDs and Gauss are added: MSDs, calculated mean squared displacements using the formula MSD = <(x-x0)**2> Gauss, calculated Gaussianity
- >>>> d = {‘Frame’: [1, 2, 3, 4, 5],
- ‘X’: [5, 6, 7, 8, 9], ‘Y’: [6, 7, 8, 9, 10]}
>>>> df = pd.DataFrame(data=d) >>>> new_track = msd.msd_calc(df, 5)
- >>>> d = {‘Frame’: [1, 2, 3, 4, 5],
- ‘X’: [5, 6, 7, 8, 9], ‘Y’: [6, 7, 8, 9, 10]}
>>>> df = pd.DataFrame(data=d) >>>> new_track = msd.msd_calc(df)
-
diff_classifier.msd.
nth_diff
(dataframe, n=int)[source]¶ Returns a new vector of size N - n containing the nth difference between vector elements.
- dataframe : pandas column of floats or ints
- input data on which differences are to be calculated.
- n : int, default is 1
- Function calculated x(i) - x(i - n) for all values in pandas column
- ax : int, 0 or 1
- Axis along which differences are to be calculated. Default is 0. If 0, input must be a pandas series. If 1, input must be a numpy array.
- diff : pandas column
- Pandas column of size N - n, where N is the original size of dataframe.
>>>> d = {‘col1’: [1, 2, 3, 4, 5]} >>>> df = pd.DataFrame(data=d) >>>> nth_diff(df)
0 1 1 1 2 1 3 1 Name: col1, dtype: int64
#test2 >>>> df = np.ones((5, 10)) >>>> nth_diff(df)
- array([[0., 0., 0., 0., 0., 0., 0., 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0.]])
>>>> df = np.ones((5, 10)) >>>> nth_diff (df)
- array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])


Football is my favourite sport of them all and also the one I play and enjoy the most. I've watched football all my life and played the sport since the age of 10.
I currently play for Passage West but support Manchester United. Throughout my life i've always played football which led to me playing for different teams and also
getting trials for teams like Wycombe Wanderers and Reading when I was younger. Even though, unfortunately I didn't make the cut I still continued to play for the following
years with my local team, Wi**sor FC.
I also have a keen interest in long distance running, also known as Cross Country running. From a young age I had an interest in my health and fitness so to me this was
the perfect sport to cater to my fitness wants. This sport also allowed me to occasionally get out of the house and get fresh air which was also very good for my health.
I was only semi competitive in this sport which included me running in school competitions and occasionally running for my athletics club (Wi**sor AC)


Cloudzilla is a tech hive; that provides budding developers with Quality Education, Accelerated learning and guided mentor ship in the Software development. We help businesses, enthusiasts and entrepreneurs grow and build software solutions for their community.
Enroll TodayBe part of a community
Get Mentored
Get Empowered
Programmes, trainings and events Offered
Our Team are experienced and proficient with these technologies...
Our Training sessions are systematic and modern. Thus providing an organized education, with primary focus on the major concepts and technologies .
We provide Qaulity resources for learning. And direct our students to standard documentation, Articles and contents.
Access to a mentors in your field to support and help you make progress in your skills.
By using accelerated learning techniques, we can help you rapidly learn skills that normally take months, years, or decades of study.
we bring you live coding sessions at intervals. we understand the power of visual impressions and interactive classes and we're commited to exploring this avenue with our budding developers.
Communities add a huge amount of context to everything we do at cloudzilla . They provide learners with a sounding board to make sure they're on the right track.


LIRR OTP
Haiku as a service
Haiku.py is an API that returns a randomly-generated haiku.
Haiku Me
how this works


{% load static %}
Lab Performance Evaluator
Labper will serve as a web portal that serves as a comprehensive tool to assist professors in conducting labs systematically and awarding grades unambiguously. The necessity for such a software arises from the various issues faced by students and professors alike in their respective lab courses. The lack of basic resources is common to both students and professors. The resources they lack however differ.


CredentialsPluginProtocol
public protocol CredentialsPluginProtocol
The protocol that defines the API for Credentials
plugins for authentication of
incoming requests.
-
The name of the plugin.
Declaration
Swift
var name: String { get }
-
User profile cache.
Declaration
Swift
var usersCache: NSCache<NSString, BaseCacheElement>? { get set }
-
An indication as to whether the plugin is redirecting or not. The redirecting scheme is used for web session authentication, where the users, that are not logged in, are redirected to a login page. All other types of authentication are non-redirecting, i.e., unauthorized requests are rejected.
Declaration
Swift
var redirecting: Bool { get }
-
Authenticate an incoming request.
Declaration
Swift
func authenticate (request: RouterRequest, response: RouterResponse, options: [String:Any], onSuccess: @escaping (UserProfile) -> Void, onFailure: @escaping (HTTPStatusCode?, [String:String]?) -> Void, onPass: @escaping (HTTPStatusCode?, [String:String]?) -> Void, inProgress: @escaping () -> Void)
Parameters
request
The
RouterRequest
object used to get information about the request.response
The
RouterResponse
object used to respond to the request.options
The dictionary of plugin specific options.
onSuccess
The closure to invoke in the case of successful authentication.
onFailure
The closure to invoke in the case of an authentication failure.
onPass
The closure to invoke when the plugin doesn’t recognize the authentication data (usually an authentication token) in the request.
inProgress
The closure to invoke to cause a redirect to the login page in the case of redirecting authentication.
-
userProfileDelegate
Default implementationA delegate for
UserProfile
manipulation.Default Implementation
The default (nil) value for
UserProfileDelegate
.Declaration
Swift
var userProfileDelegate: UserProfileDelegate? { get }


File
New
Ctrl + N
Open
Ctrl + O
Save
Ctrl + S
Save As
Ctrl + Shift + S
Export to PDF
Settings
Ctrl + ,
Close
Edit
Undo
Ctrl + Z
Redo
Ctrl + Shift + Z
Cut
Ctrl + X
Copy
Ctrl + C
Paste
Ctrl + V
Select All
Ctrl + A
Find
Ctrl + F
Replace
Ctrl + Shift + F
Auto-Indent
Ctrl + Shift + A
Indent Left
Ctrl + Left
Indent Right
Ctrl + Right
Toggle Comment
Ctrl + /
View
Themes
Base16 Dark
Base16 Light
Duotone Dark
Hopscotch
Material
Monokai
One Dark
Seti
Solarized Dark
Solarized Light
Tomorrow Night
Yeti
Zenburn
Toggle Menu Bar
Ctrl + M
Toggle Toolbar
Ctrl + .
Toggle Full Screen
F11
Preview Mode
Markdown
HTML
Open Dev Tools
Ctrl + Shift + I
Help
Documentation
Keybindings
Markdown Help
Report an Issue
About Hyde
|
|
|
New
Open
Save
Save As
Settings
About
None
*
Markdown Help
Bold
**bold**
Italics
*italics*
Strikethrough
~~strikethrough~~
Header
# H1 ## H2 ### H3
item
* item
Blockquote
> blockquote
#123
(issue)
#123
Link
[title](http://)
Image
![alt](http://)
code
`code`
L
a
T
e
X
$$LaTeX code$$
var
code =
"formatted"
;
```
(shift+enter for line break)
var code = "formatted";
```
×
About
Our mission is to create an open-source markdown editor that improves the accessibility of markdown reliant platforms and benefit new and experienced writers, alike.
Unsaved Changes
Save
Don't Save


| 020:094 Khan | : |
He [Harun (Aaron)] said: "O son of my mother! Seize (me) not by my beard, nor by my head! Verily, I feared lest you should say: 'You have caused a division among the Children of Israel, and you have not respected my word!' " |
| 020:094 Maulana | : |
He said: O son of my mother, seize me not by my beard, nor by my head. Surely I was afraid lest thou shouldst say: Thou hast caused division among the Children of Israel and not waited for my word. |
| 020:094 Pickthal | : |
He said: O son of my mother! Clutch not my beard nor my head! I feared lest thou shouldst say: Thou hast caused division among the Children of Israel, and hast not waited for my word. |
| 020:094 Rashad | : |
He said, "O son of my mother; do not pull me by my beard and my head. I was afraid that you might say, 'You have divided the Children of Israel, and disobeyed my orders.' " |
| 020:094 Sarwar | : |
Aaron replied, "Son of my mother, do not seize me by my beard or head. I was afraid that you might consider me responsible for causing discord among the children of Israel and would not pay attention to my words." |
| 020:094 Shakir | : |
He said: O son of my mother! seize me not by my beard nor by my head; surely I was afraid lest you should say: You have caused a division among the children of Israel and not waited for my word. |
| 020:094 Sherali | : |
Aaron answered, 'Son of my mother, seize me not by my beard, nor by the hair of my head. I feared lest thou shouldst say: 'Thou hast caused a division among the Children of Israel, and didst not wait for my word.' |
| 020:094 Yusufali | : |
(Aaron) replied: "O son of my mother! Seize (me) not by my beard nor by (the hair of) my head! Truly I feared lest thou shouldst say, 'Thou has caused a division among the children of Israel, and thou didst not respect my word!'" |
Concepts/Themes Covered:
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


{% extends "CheckYourAnswersPage.html" %} {% set title %} Check your answers {% endset %} {% set pageContent = { statementOfTruth: "I believe that the facts stated in this application are true.", sendApplication: "Submit application" } %}


General Election 2019: Dudley North candidates for Conservatives, Labour, Lib Dems, Brexit Party and others
The Dudley North constituency includes: Castle and Priory, Gornal, St James's, St Thomas's, Sedgley, and Upper Gornal and Woodsetton.
by Charlotte Regen, https://www.birminghammail.co.uk/authors/charlotte-regen/On December 12, voters will flock to polling stations across the Dudley North constituency.
Ian Austin was the incumbent for Dudley North but now the party has selected a new candidate.
Austin has been the MP for the constituency since 2005 after taking Ross Cranston's place.
However, Melanie Dudley will now takeover as Labour's new candidate.
Labour first won their seat back in the 1997 general election, with 5.2 per cent of votes.
Despite seeing a fluctuation in voters, the party have managed to keep their seat.
Also in the running for Dudley North's seat is:
- Conservatives - Marco Longhi
- Liberal Democrats - Ian Flynn
- Brexit Party - Rupert Lowe
- Green - Mike Harrison
Why are we having an early election?
A general election - which determines who runs the country - normally happens every five years.
There are 650 constituencies, where voters are invited to select an MP to represent their area.
Nearly three-and-a-half years ago voters were called to the ballot box to decide whether the UK should remain in or leave the European Union.
The majority chose to leave and we were supposed to have left on March, 29 this year, however, it has since been delayed after MPs failed to back plans put forward by former Prime Minister Theresa May and now Boris Johnson.
Keep up-to-date with all things bostin' in the Black Country on our We Love The Black Country Facebook group - where you'll get the latest news, travel, weather and events in your area.
To keep up-to-date with crime in your community, join the Black Country Crime Watch Facebook group where you will be alerted to any suspicious or criminal behaviour happening in your area.


Journaling in Graduate School
How I started a daily journal to document every day of my graduate career and why I think journaling in general is a good idea.
Why Journal?
If you were to ask me “why journal?” half a year ago I wouldn’t have had an answer. I never quite knew what a journal was for, and often times would confuse journal with diary.
One thing I was never able to do, no matter how amazed by journals I was, was to actually start a journal myself. The reason being I mistook a journal for a simple diary where I would write down what I did that day. Just the sheer thought of taking time to write about the egg I ate for breakfast made no sense to me. I didn’t want to write trivial things, I just wanted to write the amazing things like Darwin, or Jefferson. I kept thinking that I was not good enough to start a journal.
-Tulio Jarocki
This excerpt well-characterized my view on journaling before I started. I didn’t think a journal could benefit me at all nor did I think I had enough interesting things to write about. But journaling isn’t about writing insightful think pieces every day1. In the same blog post that the above excerpt is taken from, the writer provides a few answers to my earlier question about why someone should journal:
- Journaling allows you to understand yourself better
- Journaling allows other people to understand you better
- Journaling reminds you of the little details of your life
- Journaling makes you a better writer
- Journaling is the best motivation you will ever have
After reading this I was convinced: I was going to start a daily journal so that I could capture every idea, struggle, and milestone of obtaining my Ph.D.
But I needed a good way to do this.
The App
I spent some time reviewing popular journaling apps and it quickly became clear that Day One was one of the best for iOS and Mac.
Each entry can include a picture, a log of one’s activity for the day, and tags for easy filtering. I have mine synced with Dropbox to backup my entries and have the ability to write from either my phone or computer. There’s a bunch of other useful features too, but instead of listing them here I’ll let you read them on Day One’s website.
Journaling in Graduate School
So I started journaling to capture my life and time spent in graduate school—so far I’ve had great success.
I record fun interactions with other people in my life, my ability to write has improved significantly, and I am able to make decisions easier by writing down my thoughts as they progress throughout a week, a month, or even a semester. In particular, I knew with graduate school would come a greater emphasis on writing than my previous technical focused undergraduate background, but keeping a daily journal has enabled me to parse scrambled thoughts faster and form them into coherent ideas and directions.
It’s also fun to look back at old entries to remember past events. For me, these include both stressful times, like how I wasted energy worrying about some future thing and its impact on my career, and more cheerful outings, such as particularly engaging happy hours with other first year Ph.D.’s.
My Setup
Another great feature about Day One is the ability to write in Markdown. Since I use Markdown for all my notes and reports, it made sense to make a template for my journal entries to keep them standardized. Below is my daily format2:
Tags are helpful to better filter entries when I want to look back. Some tags have a handful of entries and some have dozens. I’ve included a few of my more general and notable tags below to help someone get started3:
- daily (to keep a quick filter for all the entries)
- gt (Georgia Tech)
- new person (to keep a record of any new person I meet)
- social
- quote
- music
- tech
- news
- website
- research
- data science (my first research area)
- visualization (my second research area)
After writing and tagging an entry I attach one picture to the post and Day One automatically logs my location, activity, and weather from the day to give some context when reading.
Some Last Thoughts
When I started this project I tweeted about it and Day One was kind enough to put the tweet on their “Uses” website.
New project: writing daily @dayoneapp entries documenting graduate school life during the next four years in @gtcomputing at @GeorgiaTech
— Fred Hohman (@fredhohman) July 18, 2015
Looking back, my first entry (titled “Day 0: The Pre-Beginning”) was short and described the Sunday before I started research at Georgia Tech. The next dozen of entries were also short and walked a fine line between a journal and a diary. But as I slowly got into the habit of writing something down every day, the entries started to get longer. It wasn’t long until my average entry was 750+ words, with an all-time high of 1000+ words.
As a data enthusiast, the Day One iOS app contains a little bonus feature in the widget on the notification screen. Once enabled, the widget will show you a “words per day” chart. It was encouraging to see this bar chart grow taller and taller as time went on.
Hopefully now you can see the benefits of journaling, especially if you are a student.
I never thought I would write a journal, write about writing a journal4, or even enjoy personal writing at all, but one semester down and I’m hooked. And even if you aren’t a student, I find that recording special moments, frustrating situations, and new ideas is a great way to brain dump at the end of a day.


Reflex.gs
Advanced, highly customizable, cross-browser, responsive grid system, supercharged with flexbox.
Complete, flexible, responsive, do-what-you-want, sass grid implementation using flexbox & scss. This demo requires flexbox support.
Overview
Reflex.gs is built following the principle of progressive enhancement. It is actually a solid grid implementation that upgrades to flex if the browser has specific support. You can check out the same demo without flex here.
How it works
The default layout runs on floats. Modernizr (an awesome feature detection library) adds a class to the html
, which enables flex
on rows and columns. You can specify a bunch of flex-related properties, but they won't be effective unless you specify display: flex
on the element. This is what we're doing with Modernizr.
If you had a look at the code, you might notice that we're not targeting flexbox support directly (we're testing against the support for flex-wrap
instead). Indeed, browser support is, at the moment, pretty good. However, if you have a closer look at the support details, you'll notice that a great deal of browsers actually supporting the display: flex
property don't support wrapping. This means that unlike floats, your columns will not be pushed down if their total width exceeds that of the container — they will overflow the container.
Features
- Built on sass
- Responsive, mobile-first approach
- Ultra customizable (see the usage section below for more information)
- Packaged with sass mixins for the flex properties, containing all the correct vendor prefixes (including prefixes for the old spec)
- Includes offsets
- Flex columns (smart columns that take up the remaining space)
- Supports IE8+ (basic grid) and all major browsers (Chrome, FF, Opera, Safari)
Usage
Check the source code (under src/
) and treat your own project as the main.scss
file. Or, you can drop in the compiled css found in the dist/
directory. Download Reflex.gs
Class Reference
.row
: flex container, must be used wrap columns (also has the clearfix for floating columns)..col col-{namespace}
: this creates a column that will grow/shrink depending on available space in the defined namespace (flex-only supported feature)..col col-{namespace}-{number}
: this creates a column that span the specific number of columns in the defined namespace. Valid numbers are (e.g.) 1-12..off-{namespace}-{number}
: this will offset a column by a specific number of columns in the defined namespace. Valid numbers are (e.g.) 1-11.
Default valid namespaces are xs
, sm
, md
, lg
. The xs
namespace is default and uses no media queries. Learn how to override namespaces.
Overriding Namespaces & Variables
Configuration may be achieved by changing the values in the _rflx.variables.scss
file. Reflex.gs declares a variable $bp-namespace-obj
(a sass map). This variable defines the breakpoints that you'd like to set and their associated namespaces.
Default configuration:
/* _rflx.variables.scss */
$number-of-columns: 12;
$gutter-width: 20px;
$bp-namespace-obj: (
(xs),
(sm, 768px),
(md, 992px),
(lg, 1200px)
);
You can add your own namespaces and breakpoints, the grid can accept as many as you give it. Reflex.gs is built from a mobile first approach, meaning you should always keep your base namespace first, this will ensure that the others cascade over it correctly.
Columns Demo
Column Offsets Demo
Responsivity By Combining Namespaces Demo
Drag browser around to test responsive breakpoints.
Intelligent Columns
Let the flex columns take up all the required space.
Even Heights
Flex columns will have even heights - neat!
Super columns
Columns with flex have even heights!
I am height: 300px;
Psst! With flexbox, you can easily vertically center content! just add a class:
.flex-center-v {
@include justify-content(center);
}
Nesting
Reflex.gs supports grid nesting.
Awesome!
Questions
You can always file an issue on the github repo.