Reference for Spec as a functor between affine schemes and algebras This might be considered as a stupid question, but I wouldn't ask if I hadn't spent some time to look into quite a few books about algebra geometrie.
I'm looking for a reference for the precise statement:
Let k be a field. The (kontravariant) functor Spec defines an equivalence of categories between the category of k-Algebras and the category of affine schemes over k. 
Somehow most elementary books avoid the notion of functors and for every other book this seems already common knowledge. 
Thank you very much for your help
JvW
 A: As Andreas Blass points out, it depends partly on how you are defining affine spectra, but I presume you are considering them as locally ringed spaces of suitable sort. Have you consulted the following text? 


*

*M. Demazure and P. Gabriel, Introduction to Algebraic Geometry and Algebraic Groups, North-Holland Mathematics Studies 39.


See I.1.2, page 4 and following, up to say I.1.2.8 (page 9) which asserts that the contravariant functor $A \mapsto Spec(A)$ is fully faithful. This is enough, because a fully faithful functor $F: C \to D$ induces an equivalence between $C$ and the full subcategory of $D$ consisting of objects of the form $F(c)$. 
The development in Demazure-Gabriel is written for commutative rings (i.e., commutative algebras over $\mathbb{Z}$), but it carries over verbatim upon replacing the word "ring" by "(commutative) $R$-algebra" over any commutative base ring $R$. Hopefully this gives you what you are looking for. 
A: You don't have to work over a base field for your statement. That is, you can just work with the category of (commutative) rings.
See Theoreme 1.20 on page 15 in David Harari's notes for his course on algebraic geometry
http://www.math.u-psud.fr/~harari/enseignement/geoalg/cours.pdf
This theorem implies, by definition, that the contravariant functor Spec from the category of (commutative) rings to the category of locally ringed spaces is fully faithful.
The essential image of Spec is what we call the category of affine schemes. If you're not familiar with the term "essential image", this definition implies that an affine scheme is a locally ringed space isomorphic to Spec$(A)$ for some ring $A$.
Proofs of this statement can also be found in Liu's Algebraic geometry and arithmetic curves. Namely, see Lemma 2.3.23 on page 48. (This is if you prefer reading in English as opposed to French.)
It's also in Chapter 2.2 of Hartshorne.
If you're uncomfortable with not working over an algebraically closed base field, you could also consult Chapter 1 of Hartshorne. The analogue of the statement you're looking for is, I believe, proved in Section 1.3. (I don't have Hartshore here with me, so I might be wrong.)
(Remarque inutile: As a consequence of the statement in Harari's notes (or Liu's book), the Spec functor is an equivalence of categories onto its essential image: the category of affine schemes.)
A: I like the exposition in Schneider's Lectures on Hopf algebras since it's very short and clear written. You find the relevant part in the section "Hopf algebras and affine schemes" on pages 16 - 18. Some remarks: 


*

*Don't be afraid, you don't have to know about Hopf algebras in order to understand the Spec functor (just ignore Prop. 1.6 and Cor. 1.7)

*As Ariyan already pointed out, $k$ can be an arbitrary commutative ring 

*Schneider uses the notation "Sp" in place of "Spec". 
