A Cryptographically Generated Address (CGA) is an Internet Protocol Version 6 (IPv6) address that has a host identifier computed from a cryptographic hash function. This procedure is a method for binding a public signature key to an IPv6 address in the Secure Neighbor Discovery Protocol (SEND). Characteristics A Cryptographically Generated Address is an IPv6 address whose interface identifier has been generated according to the CGA generation method. The interface identifier is formed by the least-significant 64 bits of an IPv6 address and is used to identify the host's network interface on its subnet. The subnet is determined by the most-significant 64 bits, the subnet prefix. {| class="wikitable" style="width: 7" |+ IPv4 address format |- ! style="width:0;"|bits |style="text-align: center; width: 50%;"| |style="text-align: center; width: 50%;"| |- ! style="width:0;"|field |style="text-align: center;"| subnet prefix |style="text-align: center;"| interface identifier |} Apart from the public key that is to be bound to the CGA, the CGA generation method takes several other input parameters including the predefined subnet prefix. These parameters, along with other parameters that are generated during the execution of the CGA generation method, form a set of parameters called the CGA Parameters data structure. The complete set of CGA Parameters has to be known in order to be able to verify the corresponding CGA. The CGA Parameters data structure consists of: modifier: a random 128-bit unsigned integer; subnetPrefix: the 64-bit prefix that defines to which subnet the CGA belongs; collCount: an 8-bit unsigned integer that must be 0, 1, or 2; publicKey: the public key as a DER-encoded ASN.1 structure of the type SubjectPublicKeyInfo; extFields: an optional variable-length field (default length 0). Additionally, a security parameter Sec determines the CGA's strength against brute-force attacks. This is a 3-bit unsigned integer that can have any value from 0 up to (and including) 7 and is encoded in the three leftmost bits of the CGA's interface identifier. The higher the value of Sec, the higher the level of security, but also the longer it generally takes to generate a CGA. For convenience, the intermediate Sec values in the pseudocode below are assumed to be stored as 8-bit unsigned integers that cannot have a value greater than 7. CGA generation method The following piece of pseudocode represents the CGA generation method, which is used to create a new Cryptographically Generated Address. 1 procedure generateCGA(Sec, subnetPrefix, publicKey, extFields): 2 modifier := random(0x00000000000000000000000000000000, // 16 octets (128 bits)