How to derive 256 bit WPA-PSK key from pass phrase entered by the User

WPA-PSK key need to be 256 bits in lenght. Somesoftware, allow the user to enter 256 Key directly by allowing to enter 64 Hexadecimal numbers. But many of them asks for a pass phrase that are between 8 to 63 character in lenght and then convert it into 256 bit Keylength.

This article briefly mentions how this is done.

A key derivation function named PBKDF2 from RSA securities is been standardised by the Wifi alliance for deriving the key from pass phrase.

To know more about the PBKDF2 click RFC2898

PBKDF2 hashes with the SSID of the Access point that we want to join to produce the 256 bit key. The hash function used is SHA1-HMAC. SHA1 computes a 160 bit hash function. And HMAC creates the Message authentication function.

The SHA1-HMAC is iterated over 4096 time to produce the Key. To know more about SHA1 click SHA1 RFC. To knoe more about HMAC, clickHMAC RFC

The Algorithm from top level looks as follows

key = PBKDF2( Pass phrase, SSID, Interation count = 4096, Key length = 256 )

Hope this helps some one.

Share:

Doing Away with the Need for Root Account in Linux

After your installation of Linux, it is a better idea to do away with root account. This is part of making your system as secure as possible. Almost all Linux installations comes with a program named sudo that provides root privileges to normal users without knowing the root password. This way you can execute commands that are meant to be executed by root. Please follow the steps below to enable any user to obtain the root privileges:

    • Need to enable any user or group, who want to gain root privileges, in /etc/sudoers. The normal practice is to enable the users belonging to group wheel to run all root privileged commands.
    • /etc/sudoers is edited by visudo. You need to be root to edit this file.
$visudo
=========== File snippet below =====================
# sudoers file.
#
# This file MUST be edited with the ‘visudo’ command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification # User alias specification # Cmnd alias specification

 

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands. Uncomment the following line
%wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

  • Now add the user you want to have root privilege into group wheel
$usermod -a -G wheel “username here without the quotes”
    Now test whether that particular user can gain root privilege. First login to the system with username you want to test
$wc /etc/sudoers
wc: /etc/sudoers: Permission denied
$sudo wc /etc/sudoers
password: # enter your account password here
28 94 579 /etc/sudoers
    if you can count the words in that file, that means you can any command that requires root privilege.

If you are using SSH to login to your machine remotely, then follow the procedure below to disallow “root” to login

    • Again it is a good practice to create a group whose users will be allowed SSH access.
    • create a group named sshusers.
$sudo groupadd sshusers
$sudo usermod -a -G sshusers “username who needs to ssh access without quotes”
      Now open /etc/ssh/sshd_config to diable
root
      login and enable the group
sshusers
$sudo vi /etc/sshd/sshd_config=========== File snippet. Only the required portion is shown=
#LoginGraceTime 2m
PermitRootLogin no
#Add this line into the file AllowGroups sshusers

Test it out just by logging in as root. You should get Access Denied message

Now try to login using a user that belongs to sshusers group. You should be able to login

Share:

Euro English.. Let us Take a break and read this hilarious Stuff

One of my friends forwarded this joke and it is really hilarious. This blog is more about technical stuff. But once in a while a dose of humor is good for you. read on and laugh heartily

ENGLISH OF TOMORROW EU ANNOUNCEMENT
The European Commission has just announced an agreement whereby English will
be the official language of the European Union rather than German, which was
the other possibility.
As part of the negotiations, the British Government conceded that English
spelling had some room for improvement and has accepted a 5- year phase-in
plan that would become known as “Euro-English”.
In the first year, “s” will replace the soft “c”. Sertainly, this will make
the sivil servants jump with joy.
The hard “c” will be dropped in favour of “k”. This should klear up
konfusion, and
keyboards kan have one less letter.
There will be growing publik enthusiasm in the sekond year when the
troublesome “ph” will be replaced with “f”. This will make words like
fotograf 20% shorter.
In the 3rd year, publik akseptanse of the new spelling kan be expekted to
reach the stage where more komplikated changes are possible.
Governments will enkourage the removal of double letters which have always
ben a deterent to akurate
speling.
Also, al wil agre that the horibl mes of the silent “e” in the languag is
disgrasful and it should go away.
By the 4th yer people wil be reseptiv to steps such as replasing “th” with
“z” and “w” with “v”.
During ze fifz yer, ze unesesary “o” kan be dropd from vords kontaining “ou”
and after ziz fifz yer, ve vil hav a reil sensi bl riten styl.
Zer vil be no mor trubl or difikultis and evrivun vil find it ezi tu
understand ech oza. Ze drem of a united urop vil finali kum tru.
Und efter ze fifz yer, ve vil al be speking German like zey vunted in ze
forst plas.
If zis mad you smil, pleas pas on to oza pepl.

Share:

An excellent site for Software Patterns, Antipatterns and Refactoring

One of the best sites i have ever found on Software patterns, anti patterns and refactoring.
Sourcemaking Patterns Antipatterns and Refactoring

Well thought out and with lot of common sense.
Especially, Death-by-planning AntiPattern is very good read.

If you are into Software project management please read more of Antipatterns.This give good insights on common project management pitfalls.

if you are a programmer,designer then Patterns and Refactoring is for you. It somewhat resembles Design patterns by Eric Gamma et al.

Share:

OneLook: A search engine for words and phrases

How often you wondered that a definition for a word from different dictionaries would have been better. Stop wondering. OneLook is for you. It is more than  “words” search engine. It indexes words from various dictionaries and provides a comprehensive information about the word. For instance, it gives a quick definition, pronunciation audio clip and usage of the word in phrases. Please see the screenshot for the word “pleasant”

 

You can also use this tool to find a pattern consisting of letters and wild-cards * and ?, to find the words matching that pattern. This is really cool. For example, say, you want to find all the 4 letter words that start with ‘sh’ and ends with ‘t’  , then you would enter “sh?t”. This would produce the following result

1. sh!t
2. shat
3. shbt
4. shdt
5. shet
6. shft
7. shht
8. shit
9. shlt
10. shmt
11. shnt
12. shot
13. shut
14. shwt
15. shyt

Also there is sister site of this called RhymeZone. Check this out as well. 
Share:

GLOSSARY OF BOTANICAL, ENGLISH AND TAMIL NAMES OF CERTAIN CROPS

Government of Tamil Nadu

Department of Economics and Statistics

Season and Crop Report 2005-06

GLOSSARY OF BOTANICAL, ENGLISH AND TAMIL NAMES OF CERTAIN CROPS

 

 

BOTANICAL ENGLISH TAMIL
1. Oryza Sativa Paddy Nel
2. Sorghum Vulgare Cholam Cholam
3. Pennisetm typhoideum Bulrush / Spiked Millet Cumbu
4. Eleusine cora cana Ragi Kelvaragu / Ragi Keppai
5. Satariaitalica Italian Millet Thinai
6. Paspalum Scrobiculatum Kodo Millet Varagu
7. Panicum Milliare Samai Samai
8. Panicum Miliaceum Common Millet Panivaragu / Kaadaikanni
9. Panicum crasgalliver-Frumenta-cum Sanwa Millet Kudiraivaali
10.Zeamays Maize Makka Cholam / Thullukka Cholam
11.Triticum spp Wheat Godumai
12.Hordeum Vulgare Barley Barley
13.Phaseolus Mungo Greengram Pacchapayaru
14.Gajanus indicus Redgram Tuvarai
15.Phascolus radiatus Blackgram Ulundu
16.Cicer arietinum Bengalgram Kadalai
17.Dolichos lab lab Field bean Mochai
18.Phaseolusa conitifolius Dewgram Naripayaru / Kallupayaru / Tullikkapayaru
19.Vigna Cating Cowpea Karamani / Tattapayaru
20.Capsicum annum Chillies Milagai
21.Coriandrurm sativum Coriander Kothamalli
22.Peper nigrum Pepper Milagu
23.Curcuma longa Turmeric Manjal
24.Allium sativum Garlic Vellaippoondu
25.Zingileer Offenale Ginger Inji
26.Carum copticum Omum / Bnishoop’s weed Omum
27.Saccharum officinarum Sugarcane Karumbu
28.Mangifera Indica Mango Maa
29.Musa sapientum Plantain Vazhai
30.Allium cepa Onion Vengaayam
31.Solanumtuberosum Potato Urulaikkizhangu
BOTANICAL ENGLISH TAMIL
32.Arachis hypogea Groundnut Verkkadalai / Nilakkadalai
33.Seasamum indicum Gingelly Ell
34.Ricinus Communis Castor Amanakku / Kottaimuthu
35.Cocos nucifera Coconut Thengaai
36.Linum usitatissimum Linseed Alivira
37.Braesicea spp Rapeseed and Mustard Kadugu
38.Guizotia abyssinica Nigerseed Peyell / uchchel
39.Carthmaus tincorius Safflower Kusumbavrai
40.Gyossium spp Cotton Paruthi
41.Crotolaria juncca Sunhemp Sanappu
42.Hibiscus Cannabins Bombay hemp / Himlipatam Jute Pulichhai / Pulimanji
43.Crochorus spp Jute Sanal
44.Indigo fera Sumatran Indigo Avuri / neeli
45.Nicotiena tabacum Tobacco Pugaiyilai
46.Areca cattcehu Arecanut Paakku
47.Coffee arabic Coffee Coffee
48.Camellia thea Tea Theyilai
49.Piper betel Betelvine Vethilai
50.Cannabis Sativa Indian hemp Ganja
51.Heva Brasilienis Rubber Rubber
52.Bitrus aurantifolia Acid lime Elumichai
53.Bitrus limon Lemon Kodi Elumichai
54.Brassica clavacca Varbullata Cabbage Muttaikose
55.Aoacardpum Occiemtable Cashew Munthiri
56.Vitis Vinifeia Grape Dratshai / Kodimunthiri
57.Psidrium guajarvs Guava Koyya
58.Aropcarpus Integrifolia Jack Pala
59.Hibiscus esculantus Lady’s Finger Vendai
60.Citrus cincsin Orange Orange
61.Amanas Sutivus Pine Apple Annasi
62.Apomaca Batalas Sweet Potato Sarkaraivalli
63.Mainhot utilissima Tapioca Maravalli
64.Carice papaya Papaya Pappali
65.Daucus Carot Carrot Carrot
66.Helianthus annus Sunflower Suriyakanthi
Share:

RF Power Conversion Table from dBm to mWatts

dBm = log10 (mW)*10
mW =10^(dBm/10)

40 dBm 10.00 watts  
36 dBm 4.00 watts { Maximum ERP allowed by FCC in U.S.
30 dBm 1.00 watts  
27 dBm 500 milliwatts  
26 dBm 400 milliwatts  
25 dBm 320 milliwatts  
24 dBm 250 milliwatts  
23 dBm 200 milliwatts { Typical output from WLAN devices at 915MHz
22 dBm 160 milliwatts  
21 dBm 130 milliwatts  
20 dBm 100 milliwatts { Maximum ERP allowed by E.T.S.I. In Europe
15 dBm 32 milliwatts  
10 dBm 10 milliwatts  
5 dBm 3.2 milliwatts  
4 dBm 2.5 milliwatts  
3 dBm 2.0 milliwatts  
2 dBm 1.6 milliwatts  
1 dBm 1.3 milliwatts  
0 dBm 1.0 milliwatts  
1- dBm 0.79 milliwatts  
5- dBm 0.32 milliwatts  
10- dBm 0.1 milliwatts  
20- dBm 0.01 milliwatts  
30- dBm 0.001 milliwatts  
40- dBm 0.0001 milliwatts  
50- dBm 0.00001 milliwatts  
60- dBm 0.000001 milliwatts  
70- dBm 0.0000001 milliwatts  
80- dBm 0.00000001 milliwatts {Receive threshold for most WLAN devices
Share:

Postfix master.cf configuration tidbit

If you want to override a named command in main.cf, normally you can specify in the master.cf as override option (-o) to the command.
There is one quirk here though. It cannot contain any white spaces. The manual page explain this clearly. However, it is silent when it comes to parameter values that contains whitespace. There are no examples as well.

The simple trick here is to replace white space with comma as well.

For example:
….. -o smtpd_client_restrictions=check_client_access,hash:/etc/postfix/access

Please see the comma after check_client_access.

But when you use this parameter in main.cf, it will be as below
smtpd_client_restrictions=check_client_access hash:/etc/postfix/access

Share: