First I wanted to say thank you all for starting development on this feature!
Don't get the wrong idea. I haven't started developing features or anything. I just wrote a small portion of code as an example of how a user might modify the current code to include more keys. Ideally, loading keys from a file would be better, but that's A LOT more code than the few lines I whipped up and spat out. Actually, I already had that code in a project, I just quickly referenced it and adapted it for that snippet.
Also there is a possibility of more than one key value for the same KID. For example County A and County B which are fairly close to each other use the same KID but with different Key values. Maybe add System ID in the file above to fix that issue?
That is a possible scenario as well, I suppose one could add an extra dimension to the array, and have it swap in key values by NAC by KeyID. It would require altering the example I wrote to be something like.
key_array[0x123][0x1337] = 0x58AB912F9D;
adp_key[0] = (key_array[d_nac][ess_keyid] & 0xFF00000000) >> 32;
Again, the code was just a gist more than anything, one thing I hadn't considered until now was whether or not the variables ess_keyid and d_nac are even available to the function they are supposed to be copied into. I still haven't even tested building with that copied in.
In addition, adding DES-OFB support would also be nice.
That's the way it usually goes when you add one feature, then suddenly there are a ton of adjacent features of similar functionality requested. Again, I'd just like to remind everybody that I'm not developing these features, I'm just encouraging others to look at the source code and tinker. That's how I learned how to code. I wanted to add a feature to something, and I looked at the code, and I tinkered, I changed something small, then I made a ton of mistakes, then I figured something out, then I kept going and I haven't looked back yet.