against riven, simply never touch her unless you are 100% sure you can kill her within 5 seconds without her being able to run away or until you have 1 item.
basically, rush either thornmail or randuins depending on the rest of their team and your champion (usually thornmail tho). good champions against her are all those that are strong standing fighters able to take her combo at 1 item and are also able to punish her if she tries to combo you like olaf, darius, garen and similar champs. if you are a champ like shyvana who will get comboed and stunned and then riven just jumps away, no matter how strong you are she can always combo you for free. dont get comboed.
also, dont get baited into fighting her before 1 item except if its 100% clean and easy and not reliant on "outplaying".
against tryndamere, just always push him in and be ready to all-in him if he tries to trade. tryndamere is actually a pretty weak champion and he only has one power he can use in lane: he can push you in and trade with you even under tower while sustaining it all up. if he falls behind a little bit in health and yo ucan push him in, he has no ways to push back and sustain so unless he recalls, he cant harm you anymore and once he recalls, just do the same, buy thornmail + lifesteal and keep pushing.