A quaternionic representation of the genetic code, previously reported by the authors (BioSystems 141 (10–19), 2016), is updated in order to incorporate chirality of nucleotide bases and amino acids. The original representation associates with each nucleotide base a prime integer quaternion of norm 7 and involves a function that assigns to each codon, represented by three of these quaternions, another integer quaternion (amino acid type quaternion). The assignation is such that the essentials of the standard genetic code (particularly its degeneration) are preserved. To show the advantages of such a quaternionic representation we have designed an algorithm to go from the primary to the tertiary structure of the protein. The algorithm uses, besides of the type quaternions, a second kind of quaternions with real components that we additionally associate with the amino acids according to their order along the proteins (order quaternions). In this context, we incorporate chirality in our representation by observing that the set of eight integer quaternions of norm 7 can be partitioned into a pair of subsets of cardinality four each with their elements mutually conjugate and by putting them into correspondence one to one with the two sets of enantiomers (D and L) of the four nucleotide bases adenine, cytosine, guanine and uracil, respectively. We then propose two diagrams in order to describe the hypothetical evolution of the genetic codes corresponding to both of the chiral systems of affinities: D-nucleotide bases/L-amino acids and L-nucleotide bases/D-amino acids at reading frames 5′ → 3′ and 3′ → 5′, respectively. Guided by these diagrams we define functions that in each case assign to the triplets of D- (L-) bases a L- (D-) amino acid type integer quaternion. Specifically, the integer quaternion associated with a given D-amino acid is the conjugate of that one corresponding to the enantiomer L. The chiral type quaternions obtained for the amino acids are used, together with a common set of order quaternions, to describe the folding of the two classes, L and D, of homochiral proteins.