<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=5&amp;t=1909" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2015-06-12T15:05:43+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5&amp;t=1909</id>
<entry>
<author><name><![CDATA[notcached]]></name></author>
<updated>2015-06-12T15:05:00+01:00</updated>
<published>2015-06-12T15:05:00+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7420#p7420</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7420#p7420"/>
<title type="html"><![CDATA[CRC]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7420#p7420"><![CDATA[
For calculating the CRC, it turns out that the polynomial needed was 0x1021<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">    my $ctx = Digest::CRC-&gt;new(width=&gt;16, poly=&gt;0x1021, init=&gt;0xffff,<br />                               refin=&gt;1, refout=&gt;1, xorout=&gt;0x0000, cont=&gt;1 );<br /><br />    $ctx-&gt;add($cleartext);<br />    my $crc2 = $ctx-&gt;hexdigest;<br /><br />    die(&quot;Bad CRC.\n&quot;) unless ( $crc2 eq &quot;f0b8&quot; );<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3744">notcached</a> — Fri Jun 12, 2015 3:05 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[notcached]]></name></author>
<updated>2015-06-12T15:05:43+01:00</updated>
<published>2015-06-03T11:34:54+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7392#p7392</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7392#p7392"/>
<title type="html"><![CDATA[Validating OTP in perl?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1909&amp;p=7392#p7392"><![CDATA[
Edit: the first step, decryption, is below now.  <br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">    my $privatekey = pack( 'H32', $aes );       # convert from hex to binary    <br />    my $binary_otp = pack( 'H32', $hex );       # convert from hex to binary    <br /><br />    my $cipher = Crypt::Rijndael-&gt;new( $privatekey, Crypt::Rijndael::MODE_CBC()\<br /> );<br />    my $cleartext = $cipher-&gt;decrypt( $binary_otp );<br /><br />    die(&quot;Bad otp length.\n&quot;) unless ( length( $cleartext ) == 16 );<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3744">notcached</a> — Wed Jun 03, 2015 11:34 am</p><hr />
]]></content>
</entry>
</feed>