in the first Bitcoin implementations (even the first one) there was used a random generator to generate the private keys and out of these the public keys and addresses..
so, no magic algorithm but randomnes and for each transaction an own key..
but maybe i missed your question..