PHP Classes

PHP DNSSEC Library: Validate DNSSEC keys and calculate the DS record

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 195 All time: 8,530 This week: 146Up
Version License PHP version Categories
dnssec-util 1.0GNU Lesser Genera...5.0Networking, PHP 5, Security
Description 

Author

This class can validate DNSSEC keys and calculate the DS record.

It can take the text of a private or public DNSSEC key and parses it to verify if its values are correctly encoded.

The class can also calculate the value of the DS record digest for the parent zone using the identification of the owner, the type of algorithm and the public key.

Innovation Award
PHP Programming Innovation award nominee
February 2015
Number 7


Prize: One downloadable copy of Komodo IDE
DNSSEC is a set of specifications meant to provide greater security to information retrieved from DNS servers.

This class can validate DNSSEC private and public keys, as well compute values for the DS records.

Manuel Lemos
Picture of Jan Altensen
  Performance   Level  
Name: Jan Altensen <contact>
Classes: 12 packages by
Country: Germany Germany
Age: 30
All time rank: 105365 in Germany Germany
Week rank: 311 Up15 in Germany Germany Up
Innovation award
Innovation award
Nominee: 5x

Example

<?php
/*
root@Debian-70-wheezy-64-minimal ~ # dig de. DS

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> de. DS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40982
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;de. IN DS

;; ANSWER SECTION:
de. 14465 IN DS 24220 8 2 FFE926ACA67ED94089390250F1F294AC84A6D84F9121DF73A79E439F 42E820C2

;; Query time: 25 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Feb 26 00:07:53 2015
;; MSG SIZE rcvd: 68



root@Debian-70-wheezy-64-minimal ~ # dig de. DNSKEY

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> de. DNSKEY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18272
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;de. IN DNSKEY

;; ANSWER SECTION:
de. 5466 IN DNSKEY 256 3 8 AwEAAZnL40PVuGKi8ZK0OhSp8DJ8I/FXtNk4SgWqudiPXlvMg623wdwq Zy9tug05Xf+dRjOOfKuDuRsN4Eo/P3pFWLi+GQmyrqw5huMIrT//SIuN zsdfxsXL4KBNskJdRO7FLJ3ILyoN0xkL8gN0A9hnPR44tlV7d8kOnrod pFCQx4Ov
de. 5466 IN DNSKEY 257 3 8 AwEAAYbcKo2IA8l6arSIiSC+l97v2vgNXrxjBJK+XkX5FYMPDfr2QgtU MHfjLPfMKiSxEXT0uL+SucI1ohv5I0C/pgz9e9NFDhMCpHLPA5s9LIzQ MHEs7Y+idlsRnBKe9Kw/B1RxzSZKxMd8UyAeA6j0vlZIKrokc1nr4ouv DhoYR3JDd7vCcvV08EIuaPgL0ijUYk071OOjRFG+waRZnVPAwFZsgDIg BJqDl/nRVRBI8k3YFVPka6Rls/EIDYloqG+X5VZC/VXbBb7fams8misz 3MsLeVy/fiH0j8SJMAZSbQxqo+/zWUJogl4Tyb5TbT1LRTfbyxII2zQ/ ATXocWOohSU=

;; Query time: 37 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Feb 26 00:08:05 2015
;; MSG SIZE rcvd: 444


*/
use dns\util\DNSSECUtil;
require_once(
'DNSSECUtil.class.php');
var_dump(DNSSECUtil::calculateDS('de.', 8, 'AwEAAYbcKo2IA8l6arSIiSC+l97v2vgNXrxjBJK+XkX5FYMPDfr2QgtU MHfjLPfMKiSxEXT0uL+SucI1ohv5I0C/pgz9e9NFDhMCpHLPA5s9LIzQ MHEs7Y+idlsRnBKe9Kw/B1RxzSZKxMd8UyAeA6j0vlZIKrokc1nr4ouv DhoYR3JDd7vCcvV08EIuaPgL0ijUYk071OOjRFG+waRZnVPAwFZsgDIg BJqDl/nRVRBI8k3YFVPka6Rls/EIDYloqG+X5VZC/VXbBb7fams8misz 3MsLeVy/fiH0j8SJMAZSbQxqo+/zWUJogl4Tyb5TbT1LRTfbyxII2zQ/ ATXocWOohSU='));

/*
array(2) {
  ["sha1"]=>
  string(40) "50D660956B2DFC9F04470D3AD88244F4192F2C98"
  ["sha256"]=>
  string(64) "FFE926ACA67ED94089390250F1F294AC84A6D84F9121DF73A79E439F42E820C2"
}
*/


  Files folder image Files  
File Role Description
Plain text file DNSSECUtil.class.php Class main class
Accessible without login Plain text file test.php Example example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:195
This week:0
All time:8,530
This week:146Up