There is an identification method: because only the seed coat of black sesame is black and the endosperm part is white, you can cut black sesame with a knife to see if it is white inside. Dyed black sesame will be black even inside (endosperm). You can also put black sesame seeds in your palm. If the palm turns black soon, it means that the black sesame seeds are probably dyed.
As for whether this black sesame is ripe or not? Even if the general manufacturer is about to rot, it will not be stupid enough to take it off before it is ripe. Therefore, the reason why black sesame is bitter is more likely to be dyed.