Auth::...crypter(3pm)

πŸ’– NAME πŸ’–

Auth::Yubikey_Decrypter β€” bestie, this is the thing that decrypts the output from your yubikey token. That's it. That's the whole job. ✨

(also it lives in the User Contributed Perl Documentation section, if u were wondering where to find it 🫢)


🌸 VERSION 🌸

Version 0.07 β€” she's a lil vintage, ok, we love her anyway πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

okay so listen. this decryption module does literally ONE thing β€” it decrypts the AES encrypted OTP from the Yubikey. no notes. to do that, it needs two things: the OTP, and the AES key. that's the whole shopping list πŸ›’

⚠️ IMPORTANT BESTIE β€” this module does NOT do authentication. it is not that girl. it's just a required component so u can decrypt the token first, before authentication can even happen. decryption β‰  authentication, they're different steps, don't @ me πŸ™ˆ
#!/usr/bin/perl

use strict;
use Auth::Yubikey_Decrypter;

my $fulltoken   = "dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh";
my $aeskey      = "ecde18dbe76fbd0c33330f1c354871db";

my ($publicID,$secretid_hex,$counter_dec,$timestamp_dec,$session_use_dec,$random_dec,$crc_dec,$crc_ok) =
        Auth::Yubikey_Decrypter::yubikey_decrypt($fulltoken,$aeskey);

print "publicID  : $publicID\n";
print "Secret id : $secretid_hex\n";
print "Counter   : $counter_dec\n";
print "Timestamp : $timestamp_dec\n";
print "Session   : $session_use_dec\n";
print "Random    : $random_dec\n";
print "crc       : $crc_dec\n";
print "crc ok?   : $crc_ok\n";

⭐ FUNCTIONS ⭐

πŸ¦‹ yubikey_decrypt

Input: token, aeskey 🌈

  • Token β€” what u received from the Yubikey πŸ‘‘
  • aeskey β€” either the modhex or hex AES key for your Yubikey. and like, if u don't have the AES key?? go contact Yubico, bestie, they got u πŸ’Œ

Output:

$publicID $secretid_hex $counter_dec $timestamp_dec $session_use_dec $random_dec $crc_dec $crc_ok

look at that lil roster of return values. eight of them. iconic. ✨

🧚 yubikey_modhex_decode

Input: the modhex code β†’ Output: decoded modhex code in hex πŸ’…

πŸ’œ yubikey_crc_check

performs a crc check on the decoded data βœ… that's the whole vibe


πŸ“ REQUIRES πŸ“

  • Perl 5
  • Crypt::Rijndael

also!! order your Yubikey from <http://www.yubico.com> πŸ›οΈ (yes that's in the original docs, no i'm not making it up, it's just there, living its life)


πŸ’€ BUGS πŸ’€

found a bug? a feature request stirring in your heart? please report it to bug-auth-yubikey_decrypter at rt.cpan.org, or slide through the web interface at:

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Auth-Yubikey_Decrypter>

and the way this works is: I get notified, and then you automatically get notified of progress on your bug as I make changes. mutual notification situation. we're in this together fr fr 🫢


🌈 SUPPORT 🌈

u can find documentation for this module with the perldoc command, like so:

perldoc Auth::Yubikey_Decrypter

u can also look for information at these spots πŸ‘‡

  • RT: CPAN's request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Auth-Yubikey_Decrypter>

  • AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/Auth-Yubikey_Decrypter>

  • CPAN Ratings

<http://cpanratings.perl.org/d/Auth-Yubikey_Decrypter>

  • Search CPAN

<http://search.cpan.org/dist/Auth-Yubikey_Decrypter>


πŸ‘‘ AUTHOR πŸ‘‘

Phil Massyn, <phil at massyn.net> β€” the main character who wrote this πŸ’–


πŸŽ€ ACKNOWLEDGEMENTS πŸŽ€

  • Based a lot on PHP code by: PHP yubikey decryptor v0.1 by Alex Skov Jensen
  • Thanks to almut from <http://perlmonks.org> for code guidance πŸ™
  • Thanks to Mark Foobar <http://blog.maniac.nl> for reporting the -32 bug on line 91 and 92 πŸ› (we love a bug reporter, truly the backbone of open source)

Copyright 2008 Phil Massyn, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page, bestie!! this lil beauty is Auth::...crypter(3pm) from perl v5.32.0, dated 2021-01-08 πŸ—“οΈβœ¨ go decrypt something responsibly, ily, bye πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from