Crypt::PBC::WIBE Perl implementation of the Boneh–Boyen–Goh Wildcarded Identity-Based Encryption (WIBE-BBG) [1]. [1] Michel Abdalla et. al. - Wildcarded Identity-Based Encryption. Journal of Cryptology: Volume 24, Issue 1 , pp 42-82. http://link.springer.com/article/10.1007%2Fs00145-010-9060-3 COPYRIGHT Copyright (C) 2014 by Oliver Günther This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . SYNOPSIS use Crypt::PBC::WIBE; # Create a new instance, generate public, master secret key my $wibe = new Crypt::PBC::WIBE( L => 2 ); # Derive Key for Alice, Bob my $alice = $wibe->derive(1); my $bob = $wibe->derive(2); # Derive Subkey (notice: same ID!) for friend of alice my $carol = $alice->derive(1); # Recap: Alice now has the ID vector [1] # and carol (friend of alice) has [1,1] # Pattern: Allow all friends (*) my $pattern = ['*']; # Create a random element from Crypt::PBC my $msg = $wibe->pairing->init_GT->random; my $cipher = $wibe->encrypt_element($pattern, $msg); die "Alice should be able to decrypt" unless $alice->decrypt_element($cipher)->is_eq($msg); die "Carol must be unable to decrypt" if $carol->decrypt_element($cipher)->is_eq($msg);