In recent years, the evolution of the information society has been steadily progressing, and specialized fields related to information such as "IoT", "AI", and "Big data" are becoming commonplace. While convenience and availability are required, the dependence on information infrastructure is high and its security must be ensured. When handling high-speed and large-capacity data, it is necessary to ensure its security by utilizing cryptographic technology and its research is indispensable. Currently, symmetric key cryptography is attracting attention in the field of cryptography and, in particular, stream ciphers. Stream ciphers have the property of being able to perform sequential encryption regardless of the length of the data. ChaCha is one of such stream cipher. However, the safety analysis for ChaCha has not been sufficiently performed, and further analysis is awaited. Regardless, the 20 round version of ChaCha, ChaCha20, is the only stream cipher adopted in TLS1.3, which is a newly proposed Internet communication encryption technology. ChaCha itself is a proposed improved version of Salsa20, and it can be said that analyzing Salsa20 as well as ChaCha is important, in both its structural and statistical analysis. In this thesis, we focused on the concept of PNB, which is used in combination with difference studies in related studies, has not been analyzed despite its high importance. In PNB, which is a concept that divides key bits from significant keys and non-significant keys, an efficient attack can be made by discovering a condition in which the number of non-significant keys increases. In this study, we first conducted a detailed analysis of PNB and clarified the conditions that are effective in attacks. In addition, we attacked under that condition, especially for Salsa20/8, the complexity was 2^139.5 and the data complexity was 2^50.5, which greatly improved the existing research.