Monday, February 27, 2012

Product Rule, Chain Rule and then Factoring

I found this video is really cool and easy to understand. Please have your attention during factoring because the author of the video did a long factorization of polynomials to make it shorten for the derivatives.





and this example also is quite easy,


Finding Partial Derivatives

In this video, I find this tutorial very easy for me to understand what is a partial derivative. It has good examples including a chain rule.



Sunday, February 19, 2012

Calculus: Implicit Differentiation

From this video, I found it very easy to understand.







Staring 07:23, he use the formula of "Point-Slope Equation of a Line", which is "y - y1 = m(x - x1)".

So y1 = -1, x1 = 1, m = -1 [the result from the derivative using implicit differentiation] so,

y - y1 = m(x - x1)

y - -1 = m(x - 1)

y + 1 = -1 (x -1)

y = -x + 1 - 1
y = -x


Note that, Point-Slope Equation of a Line is different from Equation of a Straight Line formula.
        

A leap of interest and notes for my blog

Now in this blog, I'm starting to compile videos that I have found very helpful in learning Mathematics, and this will include diverse subjects and branch of Mathematics [Calculus, Linear Algebra, Trigonometry, Geometry, etc.], and even Theoretical Computer Science.


For videos, I'll be putting notes from what I have understand from them so that I cannot forget what I have learned from the videos.

Thursday, February 16, 2012

tcpdump to grab http headers from a specific domain

If you find tcpdump as a very useful tool and you wanted to work in the shell or in a terminal, let say you're into hacking.

So it's useful to sneak on the packets using tcpdump.

To grab the headers by using tcpdump, you can use the command below,


$> for((i=0;i<13;i++)) { clear; }
$> tcpdump -i en1 -s 1024 -l -A 'port 80 and host domain.com'


where
 -i  specifies the interface,
-s specifies the number of bytes that you wanted to Snarf or sneak. From man page, it says "Snarf snaplen bytes of data from each packet rather than the default of 68"
-l  print the buffer result into stdout
-A    From man page, "Print each packet (minus its link level header) in ASCII.  Handy for capturing web pages."

then the string enclosed with single quote is the rule that I wanted to do, to grab or filter packets from port 80 and host  domain.com. Just change "domain.com" to your desired domain to try.


BTW, the command prior the tcpdump is just to clear 13 times in my terminal. I just do that to clear what's everything at the top before printing results to stdout.

Hope this helps.

Thursday, February 2, 2012

reading e-mail using telnet

Reading an e-mail in telnet is very efficient way if you're in a terminal. Using telnet, this is how we can read e-mail.

#> telnet mail.example.com 110
Trying 111.143.22.11...
Connected to mail.example.com.
Escape character is '^]'.
+OK Dovecot ready.
user user@example.com
+OK
pass myPass
+OK Logged in.
list
+OK 336 messages:
1 12235
2 6577
3 14192
4 12238
5 5575
6 16008
7 8474
.
retr 2
+OK 6577 octets
Return-path:
Envelope-to: useranother@ example.com
Delivery-date: Thu, 05 Jan 2012 16:17:35 -0700
Received: from ip20-166-235-224.ph.ph.cox.net ([20-166-235-224]:2273 helo=D99DBHK1)
by example.com with esmtp (Exim 4.69)
(envelope-from )
id 1RiwYw-0006bM-RB
for user@ example.com; Thu, 05 Jan 2012 16:17:35 -0700
From: "Mike Batista" < username@ example.com>
To: "'My Test anonymous name'" < username@ example.com>
Subject: test
Date: Thu, 5 Jan 2012 16:17:41 -0700....


tunneling using SSH and connect via MySQL in different port

I use the command below with -f [requests ssh to run in the background], and -N [to not execute a remote command]


$> ssh username@example.com -L 3307:example.com:3306 -p 2222 -f -N

the -L argument specifies that 3307 is the port to be used locally from example.com [the remote server] on its 3306 port [MySQL default port].



Then run the command below to connect to MySQL with port 3007.

$> mysql --host=127.0.0.1 --port=3307 --protocol=TCP -u mysqluser -p

Hope this helps.

Benchmarking DSA vs RSA using openssl

I came to the curiosity today with these signing encryption algorithm with DSA and RSA when I was looking for public key based authentication for ssh.

So I got this command from openssl to benchmark which of these encryption performs faster.



#> openssl speed
Doing mdc2 for 3s on 16 size blocks: 1902676 mdc2's in 3.00s
Doing mdc2 for 3s on 64 size blocks: 527773 mdc2's in 3.00s
Doing mdc2 for 3s on 256 size blocks: 135799 mdc2's in 3.00s
Doing mdc2 for 3s on 1024 size blocks: 33896 mdc2's in 3.00s
Doing mdc2 for 3s on 8192 size blocks: 4233 mdc2's in 3.00s
Doing md4 for 3s on 16 size blocks: 6152933 md4's in 3.00s
Doing md4 for 3s on 64 size blocks: 5104109 md4's in 3.00s
Doing md4 for 3s on 256 size blocks: 3207656 md4's in 2.99s
Doing md4 for 3s on 1024 size blocks: 1344698 md4's in 3.00s
Doing md4 for 3s on 8192 size blocks: 205278 md4's in 3.00s
Doing md5 for 3s on 16 size blocks: 4881899 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 3787842 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 2300209 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 875358 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 129141 md5's in 3.00s
Doing hmac(md5) for 3s on 16 size blocks: 5654254 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 64 size blocks: 4314087 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 256 size blocks: 2427231 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 1024 size blocks: 887966 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 8192 size blocks: 128380 hmac(md5)'s in 3.00s
Doing sha1 for 3s on 16 size blocks: 4631280 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 3307935 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 1861267 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 666810 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 95158 sha1's in 2.99s
Doing sha256 for 3s on 16 size blocks: 3083616 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 1881461 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 853255 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 267965 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 36205 sha256's in 3.00s
Doing sha512 for 3s on 16 size blocks: 2288153 sha512's in 3.00s
Doing sha512 for 3s on 64 size blocks: 2265591 sha512's in 3.00s
Doing sha512 for 3s on 256 size blocks: 972053 sha512's in 3.00s
Doing sha512 for 3s on 1024 size blocks: 342560 sha512's in 3.00s
Doing sha512 for 3s on 8192 size blocks: 51609 sha512's in 3.00s
Doing whirlpool for 3s on 16 size blocks: 2378237 whirlpool's in 3.00s
Doing whirlpool for 3s on 64 size blocks: 1194866 whirlpool's in 3.00s
Doing whirlpool for 3s on 256 size blocks: 498723 whirlpool's in 3.00s
Doing whirlpool for 3s on 1024 size blocks: 146635 whirlpool's in 3.00s
Doing whirlpool for 3s on 8192 size blocks: 18975 whirlpool's in 3.00s
Doing rmd160 for 3s on 16 size blocks: 4482470 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 3237339 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 1728267 rmd160's in 2.99s
Doing rmd160 for 3s on 1024 size blocks: 608903 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 86618 rmd160's in 3.00s
Doing rc4 for 3s on 16 size blocks: 47108134 rc4's in 3.00s
Doing rc4 for 3s on 64 size blocks: 12776626 rc4's in 3.00s
Doing rc4 for 3s on 256 size blocks: 3293022 rc4's in 3.00s
Doing rc4 for 3s on 1024 size blocks: 840782 rc4's in 3.00s
Doing rc4 for 3s on 8192 size blocks: 104369 rc4's in 3.00s
Doing des cbc for 3s on 16 size blocks: 10039086 des cbc's in 3.00s
Doing des cbc for 3s on 64 size blocks: 2573181 des cbc's in 3.00s
Doing des cbc for 3s on 256 size blocks: 638144 des cbc's in 3.00s
Doing des cbc for 3s on 1024 size blocks: 163403 des cbc's in 3.00s
Doing des cbc for 3s on 8192 size blocks: 20234 des cbc's in 3.00s
Doing des ede3 for 3s on 16 size blocks: 3846790 des ede3's in 2.99s
Doing des ede3 for 3s on 64 size blocks: 968144 des ede3's in 3.00s
Doing des ede3 for 3s on 256 size blocks: 245058 des ede3's in 3.00s
Doing des ede3 for 3s on 1024 size blocks: 61162 des ede3's in 3.00s
Doing des ede3 for 3s on 8192 size blocks: 7498 des ede3's in 3.01s
Doing aes-128 cbc for 3s on 16 size blocks: 25236731 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 6580816 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 256 size blocks: 1644461 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 410325 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 8192 size blocks: 52326 aes-128 cbc's in 3.00s
Doing aes-192 cbc for 3s on 16 size blocks: 22149466 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 64 size blocks: 5707223 aes-192 cbc's in 2.99s
Doing aes-192 cbc for 3s on 256 size blocks: 1430195 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 1024 size blocks: 350794 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 8192 size blocks: 44824 aes-192 cbc's in 3.00s
Doing aes-256 cbc for 3s on 16 size blocks: 19626238 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 5015452 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 256 size blocks: 1235034 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 1024 size blocks: 312623 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 8192 size blocks: 39454 aes-256 cbc's in 3.00s
Doing aes-128 ige for 3s on 16 size blocks: 24524007 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 64 size blocks: 6298562 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 256 size blocks: 1602270 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 1024 size blocks: 404477 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 8192 size blocks: 50018 aes-128 ige's in 3.00s
Doing aes-192 ige for 3s on 16 size blocks: 21086558 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 64 size blocks: 5390263 aes-192 ige's in 2.99s
Doing aes-192 ige for 3s on 256 size blocks: 1231014 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 1024 size blocks: 316161 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 8192 size blocks: 40002 aes-192 ige's in 2.99s
Doing aes-256 ige for 3s on 16 size blocks: 17406622 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 64 size blocks: 4627162 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 256 size blocks: 1159202 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 1024 size blocks: 294993 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 8192 size blocks: 37181 aes-256 ige's in 3.00s
Doing camellia-128 cbc for 3s on 16 size blocks: 18504284 camellia-128 cbc's in 2.99s
Doing camellia-128 cbc for 3s on 64 size blocks: 4689226 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 256 size blocks: 1169021 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 1024 size blocks: 296110 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 8192 size blocks: 36533 camellia-128 cbc's in 2.99s
Doing camellia-192 cbc for 3s on 16 size blocks: 13652332 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 64 size blocks: 3572197 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 256 size blocks: 927403 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 1024 size blocks: 227728 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 8192 size blocks: 28606 camellia-192 cbc's in 2.99s
Doing camellia-256 cbc for 3s on 16 size blocks: 13423551 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 64 size blocks: 3477019 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 256 size blocks: 787359 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 1024 size blocks: 149637 camellia-256 cbc's in 2.98s
Doing camellia-256 cbc for 3s on 8192 size blocks: 20773 camellia-256 cbc's in 3.00s
Doing idea cbc for 3s on 16 size blocks: 8270211 idea cbc's in 2.99s
Doing idea cbc for 3s on 64 size blocks: 1823631 idea cbc's in 3.00s
Doing idea cbc for 3s on 256 size blocks: 549502 idea cbc's in 2.99s
Doing idea cbc for 3s on 1024 size blocks: 126615 idea cbc's in 3.00s
Doing idea cbc for 3s on 8192 size blocks: 19240 idea cbc's in 3.00s
Doing seed cbc for 3s on 16 size blocks: 8629383 seed cbc's in 2.99s
Doing seed cbc for 3s on 64 size blocks: 2241257 seed cbc's in 3.00s
Doing seed cbc for 3s on 256 size blocks: 570093 seed cbc's in 3.00s
Doing seed cbc for 3s on 1024 size blocks: 137854 seed cbc's in 3.00s
Doing seed cbc for 3s on 8192 size blocks: 15752 seed cbc's in 3.00s
Doing rc2 cbc for 3s on 16 size blocks: 4005276 rc2 cbc's in 2.99s
Doing rc2 cbc for 3s on 64 size blocks: 1248173 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 256 size blocks: 305202 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 1024 size blocks: 76226 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 8192 size blocks: 9641 rc2 cbc's in 3.00s
Doing blowfish cbc for 3s on 16 size blocks: 9878444 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 64 size blocks: 2734228 blowfish cbc's in 2.99s
Doing blowfish cbc for 3s on 256 size blocks: 712464 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 187792 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 8192 size blocks: 23440 blowfish cbc's in 3.00s
Doing cast cbc for 3s on 16 size blocks: 11335541 cast cbc's in 2.99s
Doing cast cbc for 3s on 64 size blocks: 2927341 cast cbc's in 3.00s
Doing cast cbc for 3s on 256 size blocks: 714184 cast cbc's in 3.00s
Doing cast cbc for 3s on 1024 size blocks: 163409 cast cbc's in 3.00s
Doing cast cbc for 3s on 8192 size blocks: 20751 cast cbc's in 3.00s
Doing 512 bit private rsa's for 10s: 31640 512 bit private RSA's in 9.99s
Doing 512 bit public rsa's for 10s: 413550 512 bit public RSA's in 9.99s
Doing 1024 bit private rsa's for 10s: 5897 1024 bit private RSA's in 9.99s
Doing 1024 bit public rsa's for 10s: 140878 1024 bit public RSA's in 9.99s
Doing 2048 bit private rsa's for 10s: 916 2048 bit private RSA's in 9.99s
Doing 2048 bit public rsa's for 10s: 43018 2048 bit public RSA's in 9.99s
Doing 4096 bit private rsa's for 10s: 179 4096 bit private RSA's in 10.03s
Doing 4096 bit public rsa's for 10s: 11968 4096 bit public RSA's in 9.99s
Doing 512 bit sign dsa's for 10s: 31382 512 bit DSA signs in 9.99s
Doing 512 bit verify dsa's for 10s: 30974 512 bit DSA verify in 9.98s
Doing 1024 bit sign dsa's for 10s: 12790 1024 bit DSA signs in 9.99s
Doing 1024 bit verify dsa's for 10s: 12131 1024 bit DSA verify in 9.99s
Doing 2048 bit sign dsa's for 10s: 4281 2048 bit DSA signs in 10.00s
Doing 2048 bit verify dsa's for 10s: 3440 2048 bit DSA verify in 9.99s
Doing 160 bit sign ecdsa's for 10s: 48468 160 bit ECDSA signs in 9.99s 
Doing 160 bit verify ecdsa's for 10s: 12732 160 bit ECDSA verify in 10.00s
Doing 192 bit sign ecdsa's for 10s: 56273 192 bit ECDSA signs in 10.00s 
Doing 192 bit verify ecdsa's for 10s: 13384 192 bit ECDSA verify in 9.99s
Doing 224 bit sign ecdsa's for 10s: 40339 224 bit ECDSA signs in 9.99s 
Doing 224 bit verify ecdsa's for 10s: 10138 224 bit ECDSA verify in 10.00s
Doing 256 bit sign ecdsa's for 10s: 36633 256 bit ECDSA signs in 9.99s 
Doing 256 bit verify ecdsa's for 10s: 5721 256 bit ECDSA verify in 9.99s
Doing 384 bit sign ecdsa's for 10s: 18276 384 bit ECDSA signs in 10.00s 
Doing 384 bit verify ecdsa's for 10s: 3541 384 bit ECDSA verify in 10.00s
Doing 521 bit sign ecdsa's for 10s: 12898 521 bit ECDSA signs in 10.00s 
Doing 521 bit verify ecdsa's for 10s: 2335 521 bit ECDSA verify in 10.00s
Doing 163 bit sign ecdsa's for 10s: 13643 163 bit ECDSA signs in 10.00s 
Doing 163 bit verify ecdsa's for 10s: 6349 163 bit ECDSA verify in 10.00s
Doing 233 bit sign ecdsa's for 10s: 5264 233 bit ECDSA signs in 10.00s 
Doing 233 bit verify ecdsa's for 10s: 3750 233 bit ECDSA verify in 10.00s
Doing 283 bit sign ecdsa's for 10s: 3341 283 bit ECDSA signs in 10.00s 
Doing 283 bit verify ecdsa's for 10s: 2004 283 bit ECDSA verify in 10.00s
Doing 409 bit sign ecdsa's for 10s: 1701 409 bit ECDSA signs in 10.00s 
Doing 409 bit verify ecdsa's for 10s: 849 409 bit ECDSA verify in 10.00s
Doing 571 bit sign ecdsa's for 10s: 717 571 bit ECDSA signs in 10.00s 
Doing 571 bit verify ecdsa's for 10s: 378 571 bit ECDSA verify in 10.00s
Doing 163 bit sign ecdsa's for 10s: 11969 163 bit ECDSA signs in 10.00s 
Doing 163 bit verify ecdsa's for 10s: 6717 163 bit ECDSA verify in 10.00s
Doing 233 bit sign ecdsa's for 10s: 6401 233 bit ECDSA signs in 10.00s 
Doing 233 bit verify ecdsa's for 10s: 4642 233 bit ECDSA verify in 10.00s
Doing 283 bit sign ecdsa's for 10s: 4209 283 bit ECDSA signs in 9.99s 
Doing 283 bit verify ecdsa's for 10s: 2048 283 bit ECDSA verify in 10.00s
Doing 409 bit sign ecdsa's for 10s: 1707 409 bit ECDSA signs in 10.00s 
Doing 409 bit verify ecdsa's for 10s: 989 409 bit ECDSA verify in 10.00s
Doing 571 bit sign ecdsa's for 10s: 920 571 bit ECDSA signs in 10.01s 
Doing 571 bit verify ecdsa's for 10s: 448 571 bit ECDSA verify in 10.02s
Doing 160 bit  ecdh's for 10s: 16965 160-bit ECDH ops in 10.00s
Doing 192 bit  ecdh's for 10s: 14698 192-bit ECDH ops in 9.99s
Doing 224 bit  ecdh's for 10s: 9401 224-bit ECDH ops in 9.99s
Doing 256 bit  ecdh's for 10s: 8427 256-bit ECDH ops in 10.00s
Doing 384 bit  ecdh's for 10s: 4009 384-bit ECDH ops in 10.00s
Doing 521 bit  ecdh's for 10s: 2449 521-bit ECDH ops in 10.00s
Doing 163 bit  ecdh's for 10s: 13092 163-bit ECDH ops in 10.00s
Doing 233 bit  ecdh's for 10s: 9789 233-bit ECDH ops in 10.00s
Doing 283 bit  ecdh's for 10s: 4555 283-bit ECDH ops in 10.00s
Doing 409 bit  ecdh's for 10s: 2083 409-bit ECDH ops in 10.00s
Doing 571 bit  ecdh's for 10s: 919 571-bit ECDH ops in 10.01s
Doing 163 bit  ecdh's for 10s: 11583 163-bit ECDH ops in 10.00s
Doing 233 bit  ecdh's for 10s: 9161 233-bit ECDH ops in 10.00s
Doing 283 bit  ecdh's for 10s: 4049 283-bit ECDH ops in 9.99s
Doing 409 bit  ecdh's for 10s: 1788 409-bit ECDH ops in 10.00s
Doing 571 bit  ecdh's for 10s: 810 571-bit ECDH ops in 10.00s
OpenSSL 1.0.0e 6 Sep 2011
built on: Sat Oct 22 15:51:26 PHT 2011
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) 
compiler: /Developer/usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2                  0.00         0.00         0.00         0.00         0.00 
mdc2             10147.61k    11259.16k    11588.18k    11569.83k    11558.91k
md4              32815.64k   108887.66k   274635.43k   458990.25k   560545.79k
md5              26036.79k    80807.30k   196284.50k   298788.86k   352641.02k
hmac(md5)        30156.02k    92033.86k   207123.71k   303092.39k   350562.99k
sha1             24700.16k    70569.28k   158828.12k   227604.48k   260713.82k
rmd160           23906.51k    69063.23k   147972.02k   207838.89k   236524.89k
rc4             251243.38k   272568.02k   281004.54k   286986.92k   284996.95k
des cbc          53541.79k    54894.53k    54454.95k    55774.89k    55252.31k
des ede3         20584.83k    20653.74k    20911.62k    20876.63k    20406.52k
idea cbc         44255.31k    38904.13k    47047.66k    43217.92k    52538.03k
seed cbc         46177.30k    47813.48k    48647.94k    47054.17k    43013.46k
rc2 cbc          21432.92k    26627.69k    26043.90k    26018.47k    26326.36k
rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00 
blowfish cbc     52685.03k    58525.28k    60796.93k    64099.67k    64006.83k
cast cbc         60658.41k    62449.94k    60943.70k    55776.94k    56664.06k
aes-128 cbc     134595.90k   140860.28k   140327.34k   139592.29k   142884.86k
aes-192 cbc     118130.49k   122161.29k   122043.31k   119737.69k   122399.40k
aes-256 cbc     104673.27k   106996.31k   105389.57k   106708.65k   107735.72k
camellia-128 cbc    99019.58k   100036.82k    99756.46k   101072.21k   100093.09k
camellia-192 cbc    72812.44k    76206.87k    79138.39k    77731.16k    78374.70k
camellia-256 cbc    71592.27k    74176.41k    67187.97k    51418.89k    56724.14k
sha256           16445.95k    40137.83k    72811.09k    91465.39k    98863.79k
sha512           12203.48k    48332.61k    82948.52k   116927.15k   140926.98k
whirlpool        12683.93k    25490.47k    42557.70k    50051.41k    51814.40k
aes-128 ige     130794.70k   134369.32k   136727.04k   138061.48k   136582.49k
aes-192 ige     112461.64k   115376.87k   105046.53k   107916.29k   109597.45k
aes-256 ige      92835.32k    98712.79k    98918.57k   100690.94k   101528.92k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000316s 0.000024s   3167.2  41396.4
rsa 1024 bits 0.001694s 0.000071s    590.3  14101.9
rsa 2048 bits 0.010906s 0.000232s     91.7   4306.1
rsa 4096 bits 0.056034s 0.000835s     17.8   1198.0
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000318s 0.000322s   3141.3   3103.6
dsa 1024 bits 0.000781s 0.000824s   1280.3   1214.3
dsa 2048 bits 0.002336s 0.002904s    428.1    344.3
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0002s   0.0008s   4851.7   1273.2
 192 bit ecdsa (nistp192)   0.0002s   0.0007s   5627.3   1339.7
 224 bit ecdsa (nistp224)   0.0002s   0.0010s   4037.9   1013.8
 256 bit ecdsa (nistp256)   0.0003s   0.0017s   3667.0    572.7
 384 bit ecdsa (nistp384)   0.0005s   0.0028s   1827.6    354.1
 521 bit ecdsa (nistp521)   0.0008s   0.0043s   1289.8    233.5
 163 bit ecdsa (nistk163)   0.0007s   0.0016s   1364.3    634.9
 233 bit ecdsa (nistk233)   0.0019s   0.0027s    526.4    375.0
 283 bit ecdsa (nistk283)   0.0030s   0.0050s    334.1    200.4
 409 bit ecdsa (nistk409)   0.0059s   0.0118s    170.1     84.9
 571 bit ecdsa (nistk571)   0.0139s   0.0265s     71.7     37.8
 163 bit ecdsa (nistb163)   0.0008s   0.0015s   1196.9    671.7
 233 bit ecdsa (nistb233)   0.0016s   0.0022s    640.1    464.2
 283 bit ecdsa (nistb283)   0.0024s   0.0049s    421.3    204.8
 409 bit ecdsa (nistb409)   0.0059s   0.0101s    170.7     98.9
 571 bit ecdsa (nistb571)   0.0109s   0.0224s     91.9     44.7
                              op      op/s
 160 bit ecdh (secp160r1)   0.0006s   1696.5
 192 bit ecdh (nistp192)   0.0007s   1471.3
 224 bit ecdh (nistp224)   0.0011s    941.0
 256 bit ecdh (nistp256)   0.0012s    842.7
 384 bit ecdh (nistp384)   0.0025s    400.9
 521 bit ecdh (nistp521)   0.0041s    244.9
 163 bit ecdh (nistk163)   0.0008s   1309.2
 233 bit ecdh (nistk233)   0.0010s    978.9
 283 bit ecdh (nistk283)   0.0022s    455.5
 409 bit ecdh (nistk409)   0.0048s    208.3
 571 bit ecdh (nistk571)   0.0109s     91.8
 163 bit ecdh (nistb163)   0.0009s   1158.3
 233 bit ecdh (nistb233)   0.0011s    916.1
 283 bit ecdh (nistb283)   0.0025s    405.3
 409 bit ecdh (nistb409)   0.0056s    178.8
 571 bit ecdh (nistb571)   0.0123s     81.0





So the disadvantage of using DSA, is that, DSA performs slow when in signing and faster in verifying, while RSA is the other way around.

Wednesday, January 18, 2012

mysql revoke privileges

Just to take this note that to revoke a privilege in MySQL, you need to execute the command below,


mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'dealme'@'192.168.1.1';

mysql> flush privileges;



and specifying the HOST/IP address would allow the user to be validated and verified by its IP allowing to connect into the host, i.e. remote logged in which can be done by the grant command below.

mysql> GRANT ALL ON *.* TO 'dealme'@'192.168.1.1' IDENTIFIED BY 'dealmepassword'


and the command above will allow the user to connect to all database and with all privileges granted. This can be seen by querying into the database.

mysql> use mysql
mysql> select * from user where User='dealme' \G

\G would view the result vertically.

Monday, January 9, 2012

GraphViz error with SchemaSpy

Just want to notify this myself, if encountering this problem [below],

Failed to query Graphviz version information
  with: dot -V
  java.io.IOException: Cannot run program "dot": error=2, No such file or directory


Just install Graphviz and this will gone.

Tuesday, January 3, 2012

tcpdump - just for my notes

Well, I just want to put this to my blog for my own sake.

tcpdump -nq -s 0 -A -vvv -i eth0 port 80

Thanks to tcpdump.

Saturday, November 19, 2011

Frequency, Period, Amplitude and Wavelength

Frequency is the number of waves per unit time.
Period is the reciprocal of that - the duration of a single wave. 
Amplitude is the magnitude of the wave - how high it goes on the y axis. 
Wavelength is basically the same thing as period - the length of a single wave on the x axis.

Thursday, October 27, 2011

Dying Moslem see Jesus: Is Jesus the Son of God?

Muslim sees Jesus in Toronto, Canada
by Geoff Waugh on Monday, September 5, 2011 at 6:34am
Nasir SiddikiLeft to Die

By age 34, Nasir Siddiki, a successful businessman, had made his first million, but money meant nothing to him on his deathbed. Diagnosed with the worst case of shingles ever admitted to Toronto General Hospital , his immune system shut down and doctors left him to die.

The next morning I woke in a sterile room on the eighth floor of the hospital, my skin burning as though someone had doused me in gasoline and lit a match. I felt on fire from the inside out.

My doctor arrived and looked at me in wonder. “The blisters are multiplying so fast I can literally watch them grow,” he said. ‘”Your body isn’t fighting back.”

The next morning, in addition to shingles, I had chicken pox from head to toe. I was put in strict isolation. That evening my temperature soared to 107.6 degrees — hot enough to leave my brain permanently scrambled.

For days I continued to deteriorate. My nerve endings became so inflamed that a hair drifting across my skin sent shock waves of fire rippling through my body. By week’s end, I was listed in critical condition.

My Last Hope

In life, I’d been bold, self confident, a risk taker. But facing death, I was terrified. I had no idea what might await me on the other side. I’d been raised as a Moslem in London , England , and I understood Allah was not a god who heals.

My only hope was in medicine.

I eventually slipped so close to death that the doctors didn’t know I could hear them when they examined me. “His immune system has simply shut down,” one of them said.

“He’s dying,” the other confirmed. “His immune system must be compromised by AIDS.”

I don’t have AIDS! I wanted to shout, but I couldn’t form the words. Then it hit me. He said I’m dying!

The doctors spoke quietly to my co-worker, Anita. “In a few hours he’ll be dead,” they said. “If by some miracle he lives, he’ll probably be blind in his right eye, deaf in his right ear, paralyzed on his right side and he may be severely brain damaged from the high fever.”

Then they left.

They left me here to die! I felt like a drowning man going down for the third time. Gathering my strength I whispered a prayer. “God, if you’re real, don’t let me die!”

In His Presence

During the darkest hour of the night, I woke and saw a man at the foot of my bed. Rays of light emanated from him, allowing me to see his outline. I couldn’t see his face, it was too bright. No one had to tell me, I knew it was Jesus.

The Koran mentions Jesus; Moslems believe He existed, not as the son of God, but as a good man and a prophet. I knew this wasn’t Mohammed. I knew it wasn’t Allah. Jesus was in my room. There was no fear, only peace.

“Why would You come to a Moslem when everyone else has left me to die?” I wondered.
Without words, he spoke to me. “I Am the God of the Christians. I Am the God of Abraham, Isaac and Jacob.”

That’s all He said. He didn’t mention my illness. He didn’t mention my impending death. As suddenly as He appeared, He was gone.

The next morning, the same two doctors arrived to examine me. “The blisters have stopped growing!”

“We don’t know what happened, but the shingles virus has gone into remission!”

The following day, still in pain and covered with blisters, I was discharged from the hospital with a suitcase full of drugs. “Don’t leave home,” the doctor cautioned. “It will be months before the blisters go away, and when they do you’ll be left with white patches of skin and scars. The pain could last for years.”

Stepping outside into the morning sun, I looked like a cross between a leper and the Elephant Man. When people saw me, they crossed to the other side of the street. However, my mind was not on my looks; my thoughts were on Jesus. There was no doubt in my mind that Jesus’ presence in my room had stopped the shingles virus. Whatever else Jesus may be, I realized that in His presence miracles happened.

That fact left me with one consuming question: Is Jesus the Son of God as the Christians claim, or is He just a prophet as I was taught?

At home that evening, in spite of the drugs, the pain and itching was so severe I almost had to tie my hands. Even so, I fell into a restless sleep wondering about Jesus.

Learning to Live

The next morning, I woke early and turned on the television. Flipping through the channels, I froze when I saw the following words across the screen: Is Jesus the Son of God?

I listened intently as two men spent the entire program discussing this topic — answering all of my questions. Before the show went off the air, one of the men led the television audience in a prayer. My body was aflame with pain but I knelt on my living room floor anyway. Tears streaming down my face, I repeated the prayer and invited Jesus into my heart.

Immediately a voracious spiritual hunger sprang up within me. I had to know more about Jesus. In spite of my doctor’s orders to stay inside, the next day I went out and bought a Bible. First I read the books of Matthew, Mark, Luke and John. Still ravenous, I started in Genesis and read through the Bible during my sleepless nights.

Meanwhile, Anita brought me books and teaching tapes explaining the Gospel. I devoured them while continuing to study the Word of God. As my understanding of faith began to grow, I dug out a picture of how I looked before shingles. I prayed and asked God to make me look that way again.

Nasir and Anita SiddikiJesus, My Healer

One week after my discharge from the hospital, I woke and found my pillow covered in blisters. I must have clawed them in my sleep, I thought. I crawled out of bed and stepped into the shower. What had started on my pillow was finished in the shower: Every blister fell off my body!

Instead of being covered with patches of white and scar tissue, my skin was simply red and raw. It slowly healed, returning to its pre-shingles condition. When it did, I not only looked human, I looked like I did before I got sick, except for the scars that I still carry on my chest.

None of the doctor’s dire predictions came true. My eyesight was 20/20. My hearing was normal. My speech was unimpaired. I suffered no brain damage.

My healing was miraculous, swift and complete. I never suffered from lingering pain or any other complication. Not only did I have the worst case of shingles ever admitted to Toronto General Hospital , I also had the most miraculous recovery.

Jesus, the God of the Christians, showed up in the hospital room of a dying Moslem and healed me. But that wasn’t the greatest miracle He performed. The transformation that occurred in my heart was even more dramatic than the one that occurred in my body.

An international teacher and evangelist, Dr. Nasir Siddiki is the founder of Wisdom Ministries (WisdomMinistries.org). He lives in Tulsa , OK with his wife Anita and their two sons.

Friday, October 21, 2011

Using Oracle 11g thru VirtualBox appliance in Mac OS X Lion

I just found that its quite a lot of handy work to make Oracle work in Mac OS X Lion.

Currently, I have this quite cool machine with good memory anyway, so I decided to step the easy way, than the "too-much-time-to-work way".


So, I just decided to use VirtualBox with Oracle's pre-built virtual appliance with Oracle 11g Enterprise Edition.


To use this, I use the steps below.



3. I added some specific ports, since I access it thru  NAT so whenever I am, it's easier for me just to hook up my virtual appliance and turn it on.

So you can issue these command in your terminal,

$> VBoxManage modifyvm "OTN Developer Days" --natpf1 "ssh,tcp,,2222,,22"
$> VBoxManage modifyvm "OTN Developer Days" --natpf1 "oracle,tcp,,8282,,8282"
$> VBoxManage modifyvm "OTN Developer Days" --natpf1 "oracle 2,tcp,,1521,,1521"
$> VBoxManage modifyvm "OTN Developer Days" --natpf1 "oracle em,tcp,,1158,,1158"

FYI: I use VirtualBox 4.1.4



The result screenshot above are the ports I have forwarded from my Guest VM Appliacne to my Host machine.


Hope this helps.

Thursday, October 6, 2011

Steve Jobs very promising and inspirational legacy he left for us!

I just found this article posted by Horace Dediu

For my own reference, I copied it because this is truly inspirational that I can get back and read this how many times, still very inspiring.


Steve Jobs didn’t




  • Steve Jobs did not create products. He created an organization that predictably and reliably created emotionally resonant products.
  • Steve Jobs did not make movies. He made a company that predictably and reliably made blockbusters.
  • Steve Jobs did not wrest market share from competitors. He created new markets that attracted and sustained competitors.
  • Steve Jobs did not design anything. He gave others the freedom to think about what jobs products are hired to do.
  • Steve Jobs did not re-engineer processes. He brought engineering processes to works of creativity and the creative process to engineering.
  • Steve Jobs did not develop new management theories. He showed by example that innovation can be managed.
  • Steve Jobs was not a visionary. He put the dots together and saw where they led.
  • Steve Jobs was not a futurist. He just built the future one piece at a time.
  • Steve Jobs did not distort reality. He spoke what he believed would become reality at a time when those beliefs seemed far fetched.
  • Steve Jobs was not charismatic. He spoke from the heart compelling others to follow him.
  • Steve Jobs was not a gifted orator. He spoke plainly.
  • Steve Jobs was not a magician. He practiced, a lot.
He had taste.
He was curious.
He was patient.
He was foolish.
He was hungry.
These things many others can do. Maybe you can.

I would like to add on this article that, still, Steve Jobs is the same human as we are. Same as how we react, how we think, and how we process things, but with difference that he has the perfect package with great behavior, great thoughts, and great attitude leading him to very inspirational genius of all time that I have witnessed since my birth. I'm glad that I've heard him, even not met him in person, but at the least, witnessed his great achievements and inspire us on how we could make be the person we wanted to be, as how Steve Jobs did.

He's such truly inspirational, a genius, a gift for everyone in earth, made the technology in a different phase and experience in a very sophisticated user experience that we can ever think of, but him, Steve Jobs.

Even I haven't met him, he don't know me, and I don't do like appreciating and expressing my great thanks to someone that is not part of my family circle. But Steve Jobs, he gave me light, gave me passion, and great diversity to extend efforts in the area that I love and take those great inspiration thoughts that a person from technology, that I have witnessed in my generation.

Such a great happiness to me in a way that I was born, I knew someone, in the era I am zoetic and cognizant, a true Genius I witness and believe being alive whereas I wasn't born where Albert Einstein, Thomas Edison, Leonardo da Vinci, and many great legendary geniuses we knew.

May you rest in peace, and I'm always be continuing to be inspired by your great wit and your help for us, specially in the area of technology leveraging our lives into a different pace of development and ideas for new generation. I love you Steve Jobs! Thank you so much!!! You are generally a person that anyone would like to miss as you are in the line of amongst legendary Genius that the Earth and Universe acclaimed.


Edited: I want to add more quotes from him as I love his inspirational quotes.


Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma – which is living with the results of other people’s thinking. Don’t let the noise of other’s opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”