View Single Post
  #2   Report Post  
Posted to uk.d-i-y
Ian Stirling Ian Stirling is offline
external usenet poster
 
Posts: 519
Default Alarm Remote Reset

Huge wrote:
On 2006-11-14, Mike Harrison wrote:
On 14 Nov 2006 10:35:41 GMT, Huge wrote:

When our burglar alarm goes off, it generates a 4 digit code
on the panel, which in order to reset it, one reads out to
the monitoring centre - they respond with another 4 digit
code which one types into the panel, and it allows you to reset
it.

These codes are obviously algorithmically related. How? I've never had
enough samples to work it out (and usually can't be bothered to write
them down when a spider in a PIR has awoken us at 2AM).

snip
If you know the code the engineer uses to put the panel into maintainance mode, you can usually
reset using this instead.


Oh, I'm not bothered about being able to reset it - I just like to know
how things work.


If it was me designing it, I'd be using a simple hash function.

These take one number - the embedded in the unit serial number, for
example, and another number (the number it thought of first, and which
hasn't been used in the last 5000 alarms), and from these produce a third
number (which it presents as the number on the front).

The ideal hash function cannot simply be reversed, certainly not without
_vastly_ more information than you have, as well as computer time in the
centuries.

I'd use this not because it's needed, but because I've already written
such a function for use in other stuff, and it's not especially hard to
code. (though having theives get to know how to compute the code would
be bad.

It's possible the alarm instead simply adds this number to a secret number,
and rounds off any extra digits, this is quite easy to work out.

Or any other possible scheme, some of which are vulnerable to paper and
pencil, some of which will need a computer, and some which are
practically impossible to solve.