Torrent RFC or specfication?

I am just wondering if I can write a torrent client in ActionScript 3.0. I understand Adobe Flash Player can not do peer-to-peer(P2P) connection now but may partial implementation is possible, where only downloader part is possible, where Flash application connects to torrent network and download bits from different torrent clients on network? I can write a windows/mac exectuable that wraps SWF to achieve this.

I am also not able to find complete specification except BitTorrent’s. If you have been thinking about it or have some thoughts about it, I would appriciate some kind of sharing.