Description
The TimeOfDay key provides information about the current time in various forms. It can be used both to learn the calendar day and date as reported by the underlying hardware, and to discover the number of milliseconds since the system was last restarted.
Note that posession of the time of day allows a program to coordinate its behavior with other programs even in the absence of an overt channel. In highly secure environments it may be appropriate to restrict the availability of this key.
Operations
- Check Alleged Key Type (OC = KT)
Returns the alleged type of the key.
| Reply | R1 | 0x10000002: Key is a TimeOfDay key. |
- Get Hardware Time of Day (OC = 1)
Returns the current time of day as reported by the hardware's time of day clock. The accuracy of this information is platform dependent, as is the handling of time zones and such.
| Reply | W | Current year. |
| W | Day of year. |
| B | Day of week. |
| B | Month. |
| B | Day of month. |
| B | Hour (24 hour format) |
| B | minute |
| B | second |
| Result | 0 | Time returned okay. |
| KT+1 | Unknown order code |
- Get milliseconds since startup (OC = 16)
Returns the number of milliseconds that have passed since the machine was last powered up. This can be used in conjunction with the sleep key to wake up at a particular time.
| Reply | L | Milliseconds since startup |
| Result | 0 | Time returned okay. |
| KT+1 | Unknown order code |