1 Central Regulatory Domain Agent (CRDA)
2 ========================================
4 This is the Central Regulatory Domain Agent for Linux. It serves one
5 purpose: tell Linux kernel what to enforce.
10 CRDA is provided as a binary file so all the host needs is libc/uclibc.
11 You will also need udev.
16 The package build requirements currently are:
18 * python and the m2crypto package (python-m2crypto)
19 * libgcrypt or libssl (openssl) header files
20 * nl library and header files (libnl1 and libnl-dev)
21 available at git://git.kernel.org/pub/scm/libs/netlink/libnl.git
22 * regulatory database, clone this tree:
24 git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
26 and then stuff regulatory.bin (no need to build) provided there in
27 REG_BIN location specified in this Makefile. This regulatory.bin file
28 is only required to build CRDA here to verify it was built using
29 the RSA private key the public key agrees to.
32 ======================
34 Distributions can set up a udev rule to allow the kernel's regulatory
35 domain change request to be reviewed by CRDA so CRDA can pass an
36 appropriate regulatory domain. An example regulatory rule is provided
37 with this package as regulatory.rules
42 The database is maintained on the wireless-regdb.git tree. This git
43 tree maintains a binary regulatory database file which is produced
44 using its own ASCII db.txt into binary form for size efficiency. The
45 contents of the binary database are then signed using the private key.
47 CRDA will use regulatory.bin if its signature checks out with the public
48 key provided. This will prevent us from using corrupted data (in case
49 of hard drive failure) in the running kernel. This separation between
50 CRDA and the regulatory database also allows us to provide regulatory
51 updates on distributions without having to require an update on CRDA.
53 Note that upon updating the regulatory database it is advised the
54 user reboots or all the wireless modules get unloaded and reloaded.
56 Under certain circumstances it may be desirable to have the regulatory
57 agent accept multiple keys, this can be achieved by stuffing all the keys
58 desired into pubkeys. Right now we only use John Linville's public key.
63 Authors of regulatory.bin (John Linville) first need a private key, which can
64 be generated with something like this:
66 openssl genrsa -out your.key.priv.pem 2048
68 You'll then need to generate the public key and publish it. You
69 can generate it as follows:
71 openssl rsa -in your.key.priv.pem -out your.key.pub.pem -pubout -outform PEM
73 Then with this key you can generate regulatory.bin files like this:
75 ./utils/db2bin.py regulatory.bin db.txt your.key.priv.pem
80 Use the following magic(5) pattern to recognise CRDA binary regulatory
84 # CRDA Regulatory database file
85 # http://git.kernel.org/?p=linux/kernel/git/mcgrof/crda.git;a=summary
87 0 belong 0x52474442 CRDA regulatory database file
88 >4 belong 19 (Version 1)