I just wanted to share this solution. I spent countles hours searching for the solution how to share internet connection from my mac (OS X Leopard) to Windows XP wireless network. The problem was that everything worked fine without encryption, but with WEP encryption on XP couldn't connect at all.

So, after trying millions of solutions I finally found this:

How to set up a PC with a wireless card to connect to the internet through a Mac with an Airport card and internet sharing turned on:

Mac Settings:

Open System Preferences, Sharing Control Panel, Internet Tab. Once there, check only the 'Share your connection with Airport-equipped computers' box.

Click 'Start' then click 'Airport Options...'. Give your Network a Name. Set the channel to some number. This will be the 'Key index (advanced)' value on the PC.

Check the 'Enable encryption (using WEP)' box. Set the WEP key length to 40-bit.

Get WEP Key Maker. <- I updated the link, the old one doesn't work. This freeware app lets you create a reproducible hex code for a given password or phrase. Use the app to get your Hex key from WEP Key Maker; i.e. Apple -> 077495204A. You enter it with a $ in front like this>: $077495204A to make it a valid Hex password. Click OK.

PC Settings:
In your Network Connections folder, double click your "Wireless Network Connection." Select Properties and go to the Wireless Networks Tab.

Select the Network that you created with your Mac and click Configure of Properties. Check the 'Data encryption (WEP enabled)' box and the 'Network Authentication (Shared mode)' box.

Enter the Hex network key (password) you used to create the Mac network. You dont need the $ symbol in front.

Set the 'Key index (advanced)' value to the value you used to set up the Mac Network.

Make sure that 'Enable IEEE 802.x authentication for this network' is not checked under the Authentication Tab.

Upon restarting you should have a connection through your wireless card!

Thanks to Bruce Thomson on the Apple Discussions Forums.

Hope this helps. This might be familiar solution for some of you, but I think it was f*ing hard to find. Hope this helps some of you.