I found an answer to the below myself at
http://msdn.microsoft.com/en-us/libr...51(VS.85).aspx.
But I have another question: can I use the same <keyMaterial> field
across several computers or will this be different for different
computers, i.e., will the network key be encrypted differently across
different computers?
On May 23, 3:14 pm, Abhi <rka...@gmail.com> wrote:
> Hi,
>
> I am working on an application to automatically transfer wireless
> profiles between different computers. I have been able to retrieve all
> the wireless profile (aka Preferred networks) information stored on a
> Vista/XP machine in the form of XML strings. I have posted a sample
> below. I want to know how what exactly is stored in the "keyMaterial"
> field?
>
> I know it is not the actual network key for that wireless network, but
> the same seems to be stored in an encrypted form. What I want to know
> is what kind of encryption is used and is there any way to obtain the
> actual network key from this?
>
> BTW I am using the ManagedWifi library from codeplex along with API's
> from the System.Net.NetworkInformation namespace as well as some of
> the NativeWifi API's.
>
> Thanks in advance.
>
> <?xml version="1.0"?>
> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/
> v1">
> <name>example</name>
> <SSIDConfig>
> <SSID>
> <hex>63656C6C7024242344</hex>
> <name>example</name>
> </SSID>
> </SSIDConfig>
> <connectionType>ESS</connectionType>
> <MSM>
> <security>
> <authEncryption>
> <authentication>WPAPSK</authentication>
> <encryption>TKIP</encryption>
> <useOneX>false</useOneX>
> </authEncryption>
> <sharedKey>
> <keyType>networkKey</keyType>
> <protected>false</protected>
>
> <keyMaterial>9B445645E12DF6DDFE5C6694524324234FCCB C771057A3B5513F3</
> keyMaterial>
> </sharedKey>
> </security>
> </MSM>
> </WLANProfile>