TinySec: Security for TinyOS - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

TinySec: Security for TinyOS

Description:

No CRC -2 bytes. No group ID -1 bytes. MAC 4 bytes. IV 4 bytes ... CRC is ... Replaces CRC. Can be built using a block cipher. MAC key should be different ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 22
Provided by: nave51
Category:
Tags: tinyos | tinysec | crc | security

less

Transcript and Presenter's Notes

Title: TinySec: Security for TinyOS


1
TinySec Security for TinyOS
  • Chris Karlof Naveen Sastry
  • David Wagner
  • January 15, 2003
  • http//www.cs.berkeley.edu/nks/tinysec

2
Security Risks in Wireless Sensory Networks
K
  • Eavesdropping
  • Confidentiality
  • Packet Injection
  • Access control
  • Integrity
  • Jamming
  • Replay
  • Denial of Service

K
TinySec
K
K
Adversary
3
TinySec Architectural Features
  • Single shared global cryptographic key
  • Link layer encryption and integrity protection ?
    transparent to applications
  • New radio stack based on original
  • Cryptography based on a block cipher

K
K
K
4
Prior Wireless Security Schemes
  • Sensor networks have tighter resource
    requirements
  • Both 802.11 GSM use stream ciphers
  • Tricky to use correctly
  • Designed by non-cryptographers, in a committee

5
TinySec Summary
  • Security properties
  • Access control
  • Integrity
  • Confidentiality
  • Performance
  • 5 bytes / packet overhead
  • Peak bandwidth (8 bytes data)
  • 25 packets/sec vs. 40 packets/sec
  • (TinySec) (MHSR)

6
Block Ciphers
  • Pseudorandom permutation (invertible)
  • DES, RC5, Skipjack, AES
  • Maps n bits of plaintext to n bits of ciphertext
  • Used to build encryption schemes and message
    authentication codes (MAC)

7
Packet Format
  • Key Differences
  • No CRC -2 bytes
  • No group ID -1 bytes
  • MAC 4 bytes
  • IV 4 bytes
  • Total 5 bytes

8
TinySec Interfaces
  • TinySec
  • TinySecM bridges radio stack and crypto
    libraries
  • BlockCipher
  • 3 Implementations RC5M, SkipJackM,
    IdentityCipher
  • (SRI has implemented AES)
  • BlockCipherMode
  • CBCModeM handles cipher text stealing
  • No length expansion when encrypting data
  • MAC
  • CBCMACM computes message authentication code
    using CBC

9
Security Analysis
  • Access control and integrity
  • Probability of blind MAC forgery 1/232
  • Replay protection not provided, but can be done
    better at higher layers
  • Confidentiality Reused IVs can leak information
  • IV reuse will occur after 216 messages from each
    node 1 msg / min for 45 days
  • Solutions
  • increase IV length ? adds packet overhead
  • key update protocol ? adds complexity
  • Applications have different confidentiality
    requirements
  • Need a mechanism to easily quantify and configure
    confidentiality guarantees
  • Applications may provide IVs implicitly
  • Apps may be able to guarantee sufficient
    variability in their messages (eg through
    timestamps)

10
Cipher Performance
  • 2 block cipher operations per block, which take
    1.0 ms/block
  • For comparison, takes an 4.8 ms to send one
    block over radio
  • Encryption and MAC can be overlapped with
    transmission/reception

11
Discussion
  • Short packets have more overhead
  • Min data size is 8 bytes (size of block cipher)
  • Packet length not affected for more than 8 bytes
    of data
  • Acknowledgments can be authenticated with no
    extra work or overhead
  • 1/256 chance of forgery
  • Group ID no longer supported

12
Usage How does this change my life?
  • Need to be aware of keys keyfile
  • Currently, keys part of program, not intrinsic to
    mote (similar to moteID)
  • Plan to use EEPROM to tie key to mote
  • Makerules generates a keyfile if none exists and
    then uses it for programming all motes
  • Keyfiles resides in users home directory.
    Manual transfer needed to install motes from
    different computers.
  • Only application level code change
  • Just use SecureGenericComm instead of GenericComm
  • Works in simulator
  • Who is using it?
  • Pursuer-Evader demo
  • Bosch

13
Conclusions
  • TinySec can provide transparent security for
    applications
  • Access control
  • Integrity
  • Confidentiality
  • Problems not addressed
  • Jamming
  • Node or key compromise
  • Replay
  • Denial of service
  • Future work
  • Performance improvements
  • Finer granularity key management
  • Replay protection

14
Extra slides
15
Implications for reliable transport
  • CRC is replaced by MAC
  • CRC is lightweight, MAC computation is expensive
    (1000 vs. 10000 cycles for 24 byte packet)
  • MAC still detects errors, but computation must be
    completed in time for ACK transmission
  • For each 8 bytes received, a block cipher called
    is needed (1750 cycles) ? too expensive to run
    in SpiByteFifo event handler
  • Cant run as a task no real-time completion
    guarantees
  • Trick Run synchronously in event handler with
    interrupts enabled
  • Like a preemptive priority scheduler that only
    TinySec can use (!!)

16
Tradeoffs IV allocations
  • Most secure idea for IV

2
2
  • Counter must be persistent across reboot
  • Gives each sender 65000 messages before IV is
    reused (worst case)
  • Question src ID good for security (replay, IV) ?
    useful for other things?

17
Future Work
  • Replay protection
  • Use neighborhood architecture to maintain
    per-link state
  • Need to include source address
  • Variable encryption strength for applications
    with different needs
  • Tunable per message
  • Dynamic configuration

18
Goals of TinySec
  • Access Control
  • Authorized participants only
  • Integrity
  • Altering and retransmitting a message should be
    difficult
  • Confidentiality
  • Transparent to applications and programmers

19
Symmetric key encryption
  • Confidentiality achieved by encryption
  • Encryption schemes (modes) can be built using
    block ciphers
  • CBC-mode break a m bit message
  • into 64 bit chunks (m1,m2,..)
  • Transmit (c1, c2, ) and iv
  • iv is needed to achieve semantic security
  • A message looks different every time it is
  • encrypted
  • iv reuse may leak information

20
Message Authentication Codes
  • Encryption is not enough to ensure message
    integrity
  • Receiver cannot detect changes in the ciphertext
  • Resulting plaintext will still be valid
  • Integrity achieved by a message authentication
    code
  • A t bit cryptographic checksum with a k bit key
    from an m bit message
  • Can detect both malicious changes and
  • random errors
  • Replaces CRC
  • Can be built using a block cipher
  • MAC key should be different
  • than encryption key

m2
m1
length
Ek
Ek
Ek
MAC
CBC-MAC Mode
21
Conclusions
  • TinySec solves link layer communication problems
  • http//www.cs.berkeley.edu/nks/tinysec
Write a Comment
User Comments (0)
About PowerShow.com