[mythtv-users] MythTV AirPlay noob

Steven Ihde steve at x2.hamachi.us
Sun Jun 24 14:20:56 UTC 2012


On Jun 24, 2012, at 6:19 AM, Jean-Yves Avenard wrote:

> On 24 June 2012 23:11, Robert Longbottom <rongblor at googlemail.com> wrote:
>> 
>> try changing the final line of the key to:
>> 
>> 2gG0N5hvJpzwwhbhXqFKA4zaaSrw622wDniAK5MlIE0tIAKKP4yxNGjoD2QYjhBGuhvkWKaXTyY=
>> 
> 
> That key works just fine as-is...
> 
> As if anyone should ever go and modify partial bits of a 2048 bits RSA key !

The AirTunes wiki gives bad advice to verify the key with "sha1sum privkey.txt".  The text representation can vary greatly in ways that affect the SHA1 digest of the text file but do not affect the underlying key (e.g. extra spaces at the end of the line, DOS-vs-Unix linefeeds, and various ASN1 encoding issues). 

A much better way is to verify the SHA1 digest of the DER encoding of the key:

$ openssl rsa -in privkey.txt -outform der | sha1sum
writing RSA key
7a07afcdf4cbb5653318a329906afe5367cb8b13  -

which does not vary according to the various text encoding issues, and interestingly enough, gives the exact same result with or without the modification proposed above.  Since the modification does not affect the DER, it must not affect the resulting key and is therefore unnecessary.  But the modification does yield a text file which matches the SHA1 sum given on the AirTunes wiki.

-Steve




More information about the mythtv-users mailing list