During the DNA identification process of 15000 missing persons in Peru between 1980 and 2000, we observed many cases of random matches due to the population genetic structure (founder effect, low gene flow between communities and inbreeding). In this genetic context, since 2002, we have been developing an algorithm named ALIGEN with the aim of improving the match and identification. This algorithm performs a meiosis simulation in two DNA databases (relatives and missing persons). In each DNA database ALIGEN generated the haploid profiles (hap-file) for each genetic profile divided in five groups of four STR markers (match group) with a total of twenty STR markers. Simultaneously, we performs a kinship analysis using the model of allele Identity by descendent (IBD) using a threshold of 90% posterior probability in the case of fullsibs with the aim to obtain only the significative relationship and avoiding the random matches. To support the first analysis, the algorithm generated a genetic distances between two genetic profile using hap-file and this form the matrix of likeness that correspond to the genetic distance among all genetic profiles (relatives and missing persons). This matrix is used in MEGA with the aim to obtain a relationship tree. In this way we can confirm the matches, the random matches and evidence of unknown relationships. Other characteristic of the algorithm, it can able to ensure the DNA information privacy through the encryption of each genetic profile using a Hash encryption model with de hap-file generated and it is a criteria very important in the future of populations DNA databasing. Finally, ALIGEN have been validated in the last 13 years solving the identification of missing persons in many cases at national and international level. For this raison, we wish share this algorithm as an easy tool that it can be implementing for any laboratory using the formulas described in this article.